Package org.nuxeo.elasticsearch.listener
Class ElasticSearchInlineListener
java.lang.Object
org.nuxeo.elasticsearch.commands.IndexingCommandsStacker
org.nuxeo.elasticsearch.listener.ElasticSearchInlineListener
- All Implemented Interfaces:
javax.transaction.Synchronization,EventListener
public class ElasticSearchInlineListener
extends IndexingCommandsStacker
implements EventListener, javax.transaction.Synchronization
Synchronous Event listener used to record indexing command, submitted after commit completion.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static ThreadLocal<Boolean>protected static ThreadLocal<Map<String,IndexingCommands>> static final ThreadLocal<Boolean> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterCompletion(int status) voidprotected Map<String,IndexingCommands> voidhandleEvent(Event event) Handle the given event.protected booleanprotected booleanregisterSynchronization(javax.transaction.Synchronization sync) Methods inherited from class org.nuxeo.elasticsearch.commands.IndexingCommandsStacker
getCommands, getDocKey, getOrCreateCommands, isSynchronous, stackCommand, stackCommand, stackCommand
-
Field Details
-
transactionCommands
-
useSyncIndexing
-
isEnlisted
-
-
Constructor Details
-
ElasticSearchInlineListener
public ElasticSearchInlineListener()
-
-
Method Details
-
getAllCommands
- Specified by:
getAllCommandsin classIndexingCommandsStacker
-
isSyncIndexingByDefault
protected boolean isSyncIndexingByDefault()- Specified by:
isSyncIndexingByDefaultin classIndexingCommandsStacker
-
handleEvent
Description copied from interface:EventListenerHandle the given event. The listener can cancel the event by callingEvent.cancel()- Specified by:
handleEventin interfaceEventListener- Parameters:
event- the event
-
beforeCompletion
public void beforeCompletion()- Specified by:
beforeCompletionin interfacejavax.transaction.Synchronization
-
afterCompletion
public void afterCompletion(int status) - Specified by:
afterCompletionin interfacejavax.transaction.Synchronization
-
registerSynchronization
protected boolean registerSynchronization(javax.transaction.Synchronization sync)
-