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 -
Method Summary
Modifier and TypeMethodDescriptionaddWriteIndex(I index) Returns the current search index version.getWriteIndex(int version) 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.
-
Constructor Details
-
IndexCollection
protected IndexCollection()
-
-
Method Details
-
getSearchIndex
Returns the current search index version. -
setSearchIndex
-
setSearchIndex
-
getWriteIndexes
-
addWriteIndex
-
removeWriteIndex
public void removeWriteIndex(int version) -
getWriteIndex
-
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
-