Package org.serviceconnector.log
Class CacheLogger
java.lang.Object
org.serviceconnector.log.CacheLogger
The Class CacheLogger.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidabortLoadingMessage(String cacheId, String sessionId) Abort loading message.static voidcacheAppendix(String cacheId, String cacheGuardian) Cache appendix.static voidClear cache.static voidfinishCachingAppendix(String cacheId, String cacheGuardian, int numberOfParts) Finish caching appendix.static voidfinishLoadingCacheMessage(String cacheId, String sessionId, int numberOfParts, int numberOfAppendix) Finish loading cache message.static voidgotMessageFromCache(String cacheId, String sessionId, int length) Got message from cache.static booleanChecks if is enabled.static voidmessageExpired(String cid) Message expired.static voidputManagedDataToCache(String cacheId, String cacheGuardian, int appendixNr, int partNr) Put appendix part to cache.static voidputMessageToCache(String cacheId, int nrOfParts, String loadingSessionId, int length, String loadingState, String cmt) Put message to cache.static voidremoveMessageFromCache(String cid, String reason) Removes the message from cache.static voidreplaceExistingData(String cacheId, String cacheGuardian) Replace existing data.static voidstartCachingAppendix(String cacheId, String cacheGuardian, int timeout) Start caching appendix.static voidstartLoadingCacheMessage(String cacheId, String sessionId, int timeout) Start loading cache message.static voidstartLoadingReplacement(String cacheId, String cacheGuardian) Start loading replacement.static voidstopLoadingReplacement(String cacheId, String cacheGuardian, int nrOfParts) Stop loading replacement.static voidtryGetMessageFromCache(String cacheId, String sessionId, String requestedPart, String appendixNr) Try to get message from cache.
-
Method Details
-
isEnabled
public static boolean isEnabled()Checks if is enabled.- Returns:
- true, if is enabled
-
tryGetMessageFromCache
public static void tryGetMessageFromCache(String cacheId, String sessionId, String requestedPart, String appendixNr) Try to get message from cache.- Parameters:
cacheId- the cache identifiersessionId- the session idrequestedPart- the requested partappendixNr- the appendix number
-
gotMessageFromCache
Got message from cache.- Parameters:
cacheId- the cache identifiersessionId- the session id
-
startLoadingCacheMessage
Start loading cache message.- Parameters:
cacheId- the cache identifiersessionId- the session idtimeout- the loading timeout in milliseconds
-
startCachingAppendix
Start caching appendix.- Parameters:
cacheId- the cache idcacheGuardian- the cache guardiantimeout- the timeout
-
cacheAppendix
Cache appendix.- Parameters:
cacheId- the cache idcacheGuardian- the cache guardian name
-
finishLoadingCacheMessage
public static void finishLoadingCacheMessage(String cacheId, String sessionId, int numberOfParts, int numberOfAppendix) Finish loading cache message.- Parameters:
cacheId- the cache identifiersessionId- the session idnumberOfParts- the number of partsnumberOfAppendix- the number of appendix
-
finishCachingAppendix
Finish caching appendix.- Parameters:
cacheId- the cache identifiercacheGuardian- the cache guardian namenumberOfParts- the number of parts
-
abortLoadingMessage
Abort loading message.- Parameters:
cacheId- the cache identifiersessionId- the session id
-
putMessageToCache
public static void putMessageToCache(String cacheId, int nrOfParts, String loadingSessionId, int length, String loadingState, String cmt) Put message to cache.- Parameters:
cacheId- the cache identifierloadingSessionId- the loading session id
-
putManagedDataToCache
public static void putManagedDataToCache(String cacheId, String cacheGuardian, int appendixNr, int partNr) Put appendix part to cache.- Parameters:
cacheId- the cache identifiercacheGuardian- the cache guardianappendixNr- the appendix numberpartNr- the part number
-
startLoadingReplacement
Start loading replacement.- Parameters:
cacheId- the cache idcacheGuardian- the cache guardian
-
stopLoadingReplacement
Stop loading replacement.- Parameters:
cacheId- the cache idcacheGuardian- the cache guardiannrOfParts- the nr of parts
-
replaceExistingData
Replace existing data.- Parameters:
cacheId- the cache idcacheGuardian- the cache guardian
-
removeMessageFromCache
Removes the message from cache.- Parameters:
cid- the cache identifier
-
messageExpired
Message expired.- Parameters:
cid- the cache identifier
-
clearCache
public static void clearCache()Clear cache.
-