Package org.bonitasoft.engine.synchro
Class AbstractSynchroService
java.lang.Object
org.bonitasoft.engine.synchro.AbstractSynchroService
- All Implemented Interfaces:
SynchroService
- Direct Known Subclasses:
SynchroServiceImpl
- Author:
- Emmanuel Duchastenier, Charles Souillard
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidfireEvent(Map<String, Serializable> event, Serializable id) protected abstract Map<String,Serializable> Maitains a map of <EventKey, ID of the object being waited for>protected SerializablegetFiredAndRemoveIt(Map<String, Serializable> expectedEvent) protected abstract org.slf4j.Loggerprotected abstract Lockprotected StringgetWaiterAndRemoveIt(Map<String, Serializable> event) protected abstract Map<Map<String,Serializable>, String> String value is an identifier of the sempaphore for the current event.booleanprotected booleanmatchedAtLeastAllExpectedEntries(Map<String, Serializable> expectedEventEntries, Map<String, Serializable> actualEventEntries) protected abstract voidreleaseWaiter(String semaphoreKey) protected voidthrowTimeout(Map<String, Serializable> event, long timeout) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bonitasoft.engine.synchro.SynchroService
waitForEvent
-
Field Details
-
SYNCHRO_SERVICE_CACHE
- See Also:
-
cacheService
-
-
Constructor Details
-
AbstractSynchroService
-
-
Method Details
-
getWaitersMap
String value is an identifier of the sempaphore for the current event. -
getLogger
protected abstract org.slf4j.Logger getLogger() -
getEventKeyAndIdMap
Maitains a map of <EventKey, ID of the object being waited for> -
releaseWaiter
-
getServiceLock
-
fireEvent
- Specified by:
fireEventin interfaceSynchroService
-
getWaiterAndRemoveIt
-
matchedAtLeastAllExpectedEntries
protected boolean matchedAtLeastAllExpectedEntries(Map<String, Serializable> expectedEventEntries, Map<String, Serializable> actualEventEntries) -
getFiredAndRemoveIt
-
throwTimeout
- Throws:
TimeoutException
-
clearAllEvents
public void clearAllEvents()- Specified by:
clearAllEventsin interfaceSynchroService
-
hasWaiters
public boolean hasWaiters()- Specified by:
hasWaitersin interfaceSynchroService
-