org.hibernate.search.backend.impl.jgroups
public class JGroupsBackendQueueProcessor extends Object implements BackendQueueProcessor
| Modifier and Type | Field and Description |
|---|---|
static String |
BLOCK_WAITING_ACK
Configuration property specific the the backend instance.
|
static int |
DEFAULT_MESSAGE_TIMEOUT
Default value for the
MESSAGE_TIMEOUT_MS configuration property. |
static String |
DELEGATE_BACKEND
This JGroups backend is meant to delegate to a different backend on the
master node.
|
protected DirectoryBasedIndexManager |
indexManager |
protected String |
indexName |
static String |
MESSAGE_TIMEOUT_MS
Specifies the timeout defined on messages sent to other nodes via the JGroups
Channel.
|
protected MessageSender |
messageSender |
| Constructor and Description |
|---|
JGroupsBackendQueueProcessor(NodeSelectorStrategy selectionStrategy) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
boolean |
blocksForACK() |
void |
close()
Used to shutdown and eventually release resources.
|
Address |
getAddress()
Cluster's node address
|
BackendQueueProcessor |
getDelegatedBackend() |
Lock |
getExclusiveWriteLock() |
long |
getMessageTimeout() |
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.
|
public static final String BLOCK_WAITING_ACK
public static final String DELEGATE_BACKEND
public static final String MESSAGE_TIMEOUT_MS
public static final int DEFAULT_MESSAGE_TIMEOUT
MESSAGE_TIMEOUT_MS configuration property.protected MessageSender messageSender
protected String indexName
protected DirectoryBasedIndexManager indexManager
public JGroupsBackendQueueProcessor(NodeSelectorStrategy selectionStrategy)
public void initialize(Properties props, WorkerBuildContext context, DirectoryBasedIndexManager indexManager)
BackendQueueProcessorinitialize in interface BackendQueueProcessorprops - all configuration propertiescontext - context giving access to required meta dataindexManager - the index it is related to.public void close()
BackendQueueProcessorclose in interface BackendQueueProcessorpublic Address getAddress()
public void indexMappingChanged()
BackendQueueProcessorindexMappingChanged in interface BackendQueueProcessorpublic void applyWork(List<LuceneWork> workList, IndexingMonitor monitor)
BackendQueueProcessorapplyWork in interface BackendQueueProcessorworkList - list of Lucene work instance which need to be applied to the indexmonitor - a IndexingMonitor object.public void applyStreamWork(LuceneWork singleOperation, IndexingMonitor monitor)
BackendQueueProcessorBackendQueueProcessor.applyWork(List, IndexingMonitor)applyStreamWork in interface BackendQueueProcessorsingleOperation - single Lucene work instance to be applied to the indexmonitor - a IndexingMonitor object.public Lock getExclusiveWriteLock()
getExclusiveWriteLock in interface BackendQueueProcessorpublic boolean blocksForACK()
public BackendQueueProcessor getDelegatedBackend()
public long getMessageTimeout()
Copyright © 2006-2015 Red Hat, Inc. All Rights Reserved