public abstract class JmsBackendQueueProcessor extends Object implements BackendQueueProcessor, BackendQueueProcessor.Transactional
BackendQueueProcessor.Transactional
Modifier and Type | Field and Description |
---|---|
static String |
JMS_CONNECTION_FACTORY |
static String |
JMS_CONNECTION_LOGIN |
static String |
JMS_CONNECTION_PASSWORD |
static String |
JMS_QUEUE |
protected static String |
JNDI_PREFIX |
Constructor and Description |
---|
JmsBackendQueueProcessor() |
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.
|
void |
close()
Used to shutdown and eventually release resources.
|
String |
getIndexName() |
javax.jms.QueueConnection |
getJMSConnection() |
javax.jms.Queue |
getJmsQueue() |
String |
getJmsQueueName() |
SearchIntegrator |
getSearchIntegrator() |
void |
initialize(Properties props,
WorkerBuildContext context,
IndexManager indexManager)
Used at startup, called once as first method.
|
protected abstract javax.jms.QueueConnection |
initializeJMSConnection(javax.jms.QueueConnectionFactory factory,
Properties props)
Initialises the JMS QueueConnection to be used for sending Lucene work operations to the master node.
|
protected abstract javax.jms.Queue |
initializeJMSQueue(javax.jms.QueueConnectionFactory factory,
Properties props)
Initialises the JMS queue to be used for sending Lucene work operations to the master node.
|
protected abstract javax.jms.QueueConnectionFactory |
initializeJMSQueueConnectionFactory(Properties props)
Initialises the JMS QueueConnectionFactory to be used for sending Lucene work operations to the master node.
|
boolean |
isTransactional() |
void |
releaseJMSConnection(javax.jms.QueueConnection queueConnection) |
protected static final String JNDI_PREFIX
public static final String JMS_CONNECTION_FACTORY
public static final String JMS_QUEUE
public static final String JMS_CONNECTION_LOGIN
public static final String JMS_CONNECTION_PASSWORD
public void initialize(Properties props, WorkerBuildContext context, IndexManager indexManager)
BackendQueueProcessor
initialize
in interface BackendQueueProcessor
props
- all configuration propertiescontext
- context giving access to required meta dataindexManager
- the index it is related to.public javax.jms.Queue getJmsQueue()
public String getJmsQueueName()
public String getIndexName()
public SearchIntegrator getSearchIntegrator()
public void applyWork(List<LuceneWork> workList, IndexingMonitor monitor)
BackendQueueProcessor
applyWork
in interface BackendQueueProcessor
workList
- list of Lucene work instance which need to be applied to the indexmonitor
- a IndexingMonitor
object.public void applyStreamWork(LuceneWork singleOperation, IndexingMonitor monitor)
BackendQueueProcessor
BackendQueueProcessor.applyWork(List, IndexingMonitor)
applyStreamWork
in interface BackendQueueProcessor
singleOperation
- single Lucene work instance to be applied to the indexmonitor
- a IndexingMonitor
object.public javax.jms.QueueConnection getJMSConnection()
public void releaseJMSConnection(javax.jms.QueueConnection queueConnection)
public boolean isTransactional()
public void close()
BackendQueueProcessor
close
in interface BackendQueueProcessor
protected abstract javax.jms.QueueConnectionFactory initializeJMSQueueConnectionFactory(Properties props)
props
- a Properties
object.QueueConnectionFactory
protected abstract javax.jms.Queue initializeJMSQueue(javax.jms.QueueConnectionFactory factory, Properties props)
initializeJMSQueueConnectionFactory(Properties)
factory
- a QueueConnectionFactory
object.props
- a Properties
object.Queue
protected abstract javax.jms.QueueConnection initializeJMSConnection(javax.jms.QueueConnectionFactory factory, Properties props)
initializeJMSQueue(QueueConnectionFactory, Properties)
.factory
- a QueueConnectionFactory
object.props
- a Properties
object.QueueConnection
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved