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 Details

    • IndexCollection

      protected IndexCollection()
  • Method Details

    • 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()
    • addWriteIndex

      public I addWriteIndex(I index)
    • removeWriteIndex

      public void removeWriteIndex(int version)
    • getWriteIndex

      public I getWriteIndex(int version)
    • start

      public void start()
      Description copied from interface: LifecycleListener
      Invoked when the server is starting.
      Specified by:
      start in interface LifecycleListener
    • stop

      public void stop()
      Description copied from interface: LifecycleListener
      Invoked when the server is stopping.
      Specified by:
      stop in interface LifecycleListener