ProjectCache: Remove unused 'remove' method
Change-Id: Ie6e1a21749189edb247dbcc73cf0e19006a018ef
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user