|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.search.backend.impl.jgroups.JGroupsBackendQueueProcessor
public class JGroupsBackendQueueProcessor
This index backend is able to switch dynamically between a standard Lucene index writing backend and one which sends work remotely over a JGroups channel.
| Field Summary | |
|---|---|
protected org.jgroups.Channel |
channel
|
protected DirectoryBasedIndexManager |
indexManager
|
protected String |
indexName
|
| Constructor Summary | |
|---|---|
JGroupsBackendQueueProcessor(NodeSelectorStrategy selectionStrategy)
|
|
| Method Summary | |
|---|---|
void |
applyStreamWork(LuceneWork singleOperation,
IndexingMonitor monitor)
Applies a single operation on the index, and different operations can be applied in parallel, even in parallel to a workList instance being processed by BackendQueueProcessor.applyWork(List, IndexingMonitor) |
void |
applyWork(List<LuceneWork> workList,
IndexingMonitor monitor)
Applies a list of operations to the index. |
void |
close()
Used to shutdown and eventually release resources. |
org.jgroups.Address |
getAddress()
Cluster's node address |
Lock |
getExclusiveWriteLock()
|
void |
indexMappingChanged()
Used to notify the backend that the number or type of indexed entities being indexed in this backend changed. |
void |
initialize(Properties props,
WorkerBuildContext context,
DirectoryBasedIndexManager indexManager)
Used at startup, called once as first method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.jgroups.Channel channel
protected String indexName
protected DirectoryBasedIndexManager indexManager
| Constructor Detail |
|---|
public JGroupsBackendQueueProcessor(NodeSelectorStrategy selectionStrategy)
| Method Detail |
|---|
public void initialize(Properties props,
WorkerBuildContext context,
DirectoryBasedIndexManager indexManager)
BackendQueueProcessor
initialize in interface BackendQueueProcessorprops - all configuration propertiescontext - context giving access to required meta dataindexManager - the index it is related to.public void close()
BackendQueueProcessor
close in interface BackendQueueProcessorpublic org.jgroups.Address getAddress()
public void indexMappingChanged()
BackendQueueProcessor
indexMappingChanged in interface BackendQueueProcessor
public void applyWork(List<LuceneWork> workList,
IndexingMonitor monitor)
BackendQueueProcessor
applyWork in interface BackendQueueProcessorworkList - list of Lucene work instance which need to be applied to the index
public void applyStreamWork(LuceneWork singleOperation,
IndexingMonitor monitor)
BackendQueueProcessorBackendQueueProcessor.applyWork(List, IndexingMonitor)
applyStreamWork in interface BackendQueueProcessorsingleOperation - single Lucene work instance to be applied to the indexpublic Lock getExclusiveWriteLock()
getExclusiveWriteLock in interface BackendQueueProcessor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||