Class LockAcquiringBackend


  • public class LockAcquiringBackend
    extends Object
    Transitionally backend used when we receive indexing operation to be applied to the (local) IndexWriter, but the index lock is not available yet. We will try again to look for the lock to be made available at each incoming operation, and buffer writes for later consumption if the lock is still not available. Such checks are synchronized, so this will cause some backpressure. The buffer containing postponed write operations is also bounded and will trigger more backpressure when it's filled (although filling it should not be possible as the current implementation steals the locks aggressively).
    Since:
    7.0
    Author:
    Sanne Grinovero <sanne@hibernate.org> (C) 2014 Red Hat Inc.
    • Constructor Detail

      • LockAcquiringBackend

        public LockAcquiringBackend​(org.infinispan.query.indexmanager.LazyInitializableBackend clusteredSwitchingBackend)
    • Method Detail

      • applyWork

        public void applyWork​(List<org.hibernate.search.backend.LuceneWork> workList,
                              org.hibernate.search.backend.IndexingMonitor monitor,
                              org.hibernate.search.indexes.spi.IndexManager indexManager)
      • applyStreamWork

        public void applyStreamWork​(org.hibernate.search.backend.LuceneWork singleOperation,
                                    org.hibernate.search.backend.IndexingMonitor monitor,
                                    org.hibernate.search.indexes.spi.IndexManager indexManager)
      • flushAndClose

        public void flushAndClose​(org.infinispan.query.indexmanager.IndexingBackend replacement)
      • isMasterLocal

        public boolean isMasterLocal()