ProjectCache: Remove unused 'remove' method

Change-Id: Ie6e1a21749189edb247dbcc73cf0e19006a018ef
This commit is contained in:
David Pursehouse
2017-07-26 10:31:18 +01:00
parent 17dc2bfb2c
commit ebbc55a809
3 changed files with 0 additions and 24 deletions

View File

@@ -51,12 +51,6 @@ public interface ProjectCache {
/** Invalidate the cached information about the given project. */
void evict(Project.NameKey p);
/**
* Remove information about the given project from the cache. It will no longer be returned from
* {@link #all()}.
*/
void remove(Project p);
/** @return sorted iteration of projects. */
Iterable<Project.NameKey> all();

View File

@@ -165,21 +165,6 @@ public class ProjectCacheImpl implements ProjectCache {
}
}
@Override
public void remove(Project p) {
listLock.lock();
try {
SortedSet<Project.NameKey> n = Sets.newTreeSet(list.get(ListKey.ALL));
n.remove(p.getNameKey());
list.put(ListKey.ALL, Collections.unmodifiableSortedSet(n));
} catch (ExecutionException e) {
log.warn("Cannot list available projects", e);
} finally {
listLock.unlock();
}
evict(p);
}
@Override
public void onCreateProject(Project.NameKey newProjectName) {
listLock.lock();

View File

@@ -238,9 +238,6 @@ public class RefControlTest {
@Override
public void evict(Project p) {}
@Override
public void remove(Project p) {}
@Override
public Iterable<Project.NameKey> all() {
return Collections.emptySet();