Package com.google.gerrit.index
Class IndexCollection<K,V,I extends Index<K,V>>
- java.lang.Object
-
- com.google.gerrit.index.IndexCollection<K,V,I>
-
- All Implemented Interfaces:
LifecycleListener,EventListener
- Direct Known Subclasses:
AccountIndexCollection,ChangeIndexCollection,GroupIndexCollection
public abstract class IndexCollection<K,V,I extends Index<K,V>> extends Object implements LifecycleListener
Dynamic pointers to the index versions used for searching and writing.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedIndexCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IaddWriteIndex(I index)IgetSearchIndex()Returns the current search index version.IgetWriteIndex(int version)Collection<I>getWriteIndexes()voidremoveWriteIndex(int version)voidsetSearchIndex(I index)voidsetSearchIndex(I index, boolean closeOld)voidstart()Invoked when the server is starting.voidstop()Invoked when the server is stopping.
-
-
-
Method Detail
-
getSearchIndex
public I getSearchIndex()
Returns the current search index version.
-
setSearchIndex
public void setSearchIndex(I index)
-
setSearchIndex
public void setSearchIndex(I index, boolean closeOld)
-
getWriteIndexes
public Collection<I> getWriteIndexes()
-
removeWriteIndex
public void removeWriteIndex(int version)
-
getWriteIndex
public I getWriteIndex(int version)
-
start
public void start()
Description copied from interface:LifecycleListenerInvoked when the server is starting.- Specified by:
startin interfaceLifecycleListener
-
stop
public void stop()
Description copied from interface:LifecycleListenerInvoked when the server is stopping.- Specified by:
stopin interfaceLifecycleListener
-
-