org.hibernate.search.backend.impl.jms
Class JMSBackendQueueProcessor
java.lang.Object
org.hibernate.search.backend.impl.jms.JMSBackendQueueProcessor
- All Implemented Interfaces:
- BackendQueueProcessor
public class JMSBackendQueueProcessor
- extends Object
- implements BackendQueueProcessor
- Author:
- Emmanuel Bernard, Hardy Ferentschik, Sanne Grinovero (C) 2011 Red Hat Inc.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JMS_CONNECTION_FACTORY
public static final String JMS_CONNECTION_FACTORY
- See Also:
- Constant Field Values
JMS_QUEUE
public static final String JMS_QUEUE
- See Also:
- Constant Field Values
JMSBackendQueueProcessor
public JMSBackendQueueProcessor()
initialize
public void initialize(Properties props,
WorkerBuildContext context,
DirectoryBasedIndexManager indexManager)
- Description copied from interface:
BackendQueueProcessor
- Used at startup, called once as first method.
- Specified by:
initialize in interface BackendQueueProcessor
- Parameters:
props - all configuration propertiescontext - context giving access to required meta dataindexManager - the index it is related to.
getJMSFactory
public javax.jms.QueueConnectionFactory getJMSFactory()
getJmsQueue
public javax.jms.Queue getJmsQueue()
getJmsQueueName
public String getJmsQueueName()
prepareJMSTools
public void prepareJMSTools()
getSearchFactory
public SearchFactoryImplementor getSearchFactory()
close
public void close()
- Description copied from interface:
BackendQueueProcessor
- Used to shutdown and eventually release resources.
No other method should be used after this one.
- Specified by:
close in interface BackendQueueProcessor
applyWork
public void applyWork(List<LuceneWork> workList,
IndexingMonitor monitor)
- Description copied from interface:
BackendQueueProcessor
- Applies a list of operations to the index. A single list might be processed by applying
elements in parallel threads, but no work should be started on a new workList until the previous
one was fully processed.
Work could be applied asynchronously according to capabilities and configuration of implementor.
A null parameter is not acceptable, implementations should throw an IllegalArgumentException.
- Specified by:
applyWork in interface BackendQueueProcessor
- Parameters:
workList - list of Lucene work instance which need to be applied to the index
applyStreamWork
public void applyStreamWork(LuceneWork singleOperation,
IndexingMonitor monitor)
- Description copied from interface:
BackendQueueProcessor
- 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)
- Specified by:
applyStreamWork in interface BackendQueueProcessor
- Parameters:
singleOperation - single Lucene work instance to be applied to the index
getExclusiveWriteLock
public Lock getExclusiveWriteLock()
- Specified by:
getExclusiveWriteLock in interface BackendQueueProcessor
- Returns:
- a Lock instance which will block index modifications when acquired
Copyright © 2006-2012 Hibernate. All Rights Reserved.