public abstract class AbstractSynchroService extends Object implements SynchroService
| Modifier and Type | Field and Description |
|---|---|
protected org.bonitasoft.engine.cache.CommonCacheService |
cacheService |
protected org.bonitasoft.engine.log.technical.TechnicalLoggerService |
logger |
protected static String |
SYNCHRO_SERVICE_CACHE |
| Constructor and Description |
|---|
AbstractSynchroService(org.bonitasoft.engine.log.technical.TechnicalLoggerService logger,
org.bonitasoft.engine.cache.CommonCacheService cacheService) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAllEvents() |
void |
fireEvent(Map<String,Serializable> event,
Serializable id) |
protected abstract Map<String,Serializable> |
getEventKeyAndIdMap()
Maitains a map of
|
protected Serializable |
getFiredAndRemoveIt(Map<String,Serializable> expectedEvent) |
protected abstract Lock |
getServiceLock() |
protected String |
getWaiterAndRemoveIt(Map<String,Serializable> event) |
protected abstract Map<Map<String,Serializable>,String> |
getWaitersMap()
String value is an identifier of the sempaphore for the current event.
|
boolean |
hasWaiters() |
protected boolean |
matchedAtLeastAllExpectedEntries(Map<String,Serializable> expectedEventEntries,
Map<String,Serializable> actualEventEntries) |
protected abstract void |
releaseWaiter(String semaphoreKey) |
protected void |
throwTimeout(Map<String,Serializable> event,
long timeout) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwaitForEventprotected static final String SYNCHRO_SERVICE_CACHE
protected final org.bonitasoft.engine.log.technical.TechnicalLoggerService logger
protected final org.bonitasoft.engine.cache.CommonCacheService cacheService
public AbstractSynchroService(org.bonitasoft.engine.log.technical.TechnicalLoggerService logger,
org.bonitasoft.engine.cache.CommonCacheService cacheService)
protected abstract Map<Map<String,Serializable>,String> getWaitersMap()
protected abstract Map<String,Serializable> getEventKeyAndIdMap()
protected abstract void releaseWaiter(String semaphoreKey)
protected abstract Lock getServiceLock()
public void fireEvent(Map<String,Serializable> event, Serializable id)
fireEvent in interface SynchroServiceprotected String getWaiterAndRemoveIt(Map<String,Serializable> event)
protected boolean matchedAtLeastAllExpectedEntries(Map<String,Serializable> expectedEventEntries, Map<String,Serializable> actualEventEntries)
protected Serializable getFiredAndRemoveIt(Map<String,Serializable> expectedEvent)
protected void throwTimeout(Map<String,Serializable> event, long timeout) throws TimeoutException
TimeoutExceptionpublic void clearAllEvents()
clearAllEvents in interface SynchroServicepublic boolean hasWaiters()
hasWaiters in interface SynchroServiceCopyright © 2016 Bonitasoft S.A.. All rights reserved.