org.infinispan.query.indexmanager
Class InfinispanCommandsBackend
java.lang.Object
org.infinispan.query.indexmanager.InfinispanCommandsBackend
- All Implemented Interfaces:
- org.hibernate.search.backend.spi.BackendQueueProcessor
public class InfinispanCommandsBackend
- extends Object
- implements org.hibernate.search.backend.spi.BackendQueueProcessor
An Hibernate Search backend module tailored to delegate index writing to
another node in the Infinispan cluster using custom remoting commands.
The master IndexWriter for each index is elected as a consistent hash
on the index name. Index shards in Hibernate Search have different names,
so this provides a primitive load balancing.
TODO Design a policy to deterministically try balance different shards of
the same index on different nodes.
- Author:
- Sanne Grinovero
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InfinispanCommandsBackend
public InfinispanCommandsBackend()
initialize
public void initialize(Properties props,
org.hibernate.search.spi.WorkerBuildContext context,
org.hibernate.search.indexes.impl.DirectoryBasedIndexManager indexManager)
- Specified by:
initialize
in interface org.hibernate.search.backend.spi.BackendQueueProcessor
close
public void close()
- Specified by:
close
in interface org.hibernate.search.backend.spi.BackendQueueProcessor
applyWork
public void applyWork(List<org.hibernate.search.backend.LuceneWork> workList,
org.hibernate.search.backend.IndexingMonitor monitor)
- Specified by:
applyWork
in interface org.hibernate.search.backend.spi.BackendQueueProcessor
applyStreamWork
public void applyStreamWork(org.hibernate.search.backend.LuceneWork singleOperation,
org.hibernate.search.backend.IndexingMonitor monitor)
- Specified by:
applyStreamWork
in interface org.hibernate.search.backend.spi.BackendQueueProcessor
getExclusiveWriteLock
public Lock getExclusiveWriteLock()
- Specified by:
getExclusiveWriteLock
in interface org.hibernate.search.backend.spi.BackendQueueProcessor
indexMappingChanged
public void indexMappingChanged()
- Specified by:
indexMappingChanged
in interface org.hibernate.search.backend.spi.BackendQueueProcessor
isMasterLocal
public boolean isMasterLocal()
Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.