Package de.caluga.morphium.cache
Klasse MessagingCacheSynchronizer
java.lang.Object
de.caluga.morphium.cache.AbstractCacheSynchronizer<MessagingCacheSyncListener>
de.caluga.morphium.cache.MessagingCacheSynchronizer
- Alle implementierten Schnittstellen:
MessageListener,MorphiumStorageListener<Object>
public class MessagingCacheSynchronizer
extends AbstractCacheSynchronizer<MessagingCacheSyncListener>
implements MessageListener, MorphiumStorageListener<Object>
User: Stephan Bösebeck
Date: 27.05.12
Time: 14:14
Connects to the Messaging system and to morphium. As soon as there is a message coming with name "cacheSync", this
is responsible for clearing the local cache for this entity.
Messaging used:
- Msg.name == Always cacheSync
- Msg.type == Always multi - more than one node may listen to those messages
- Msg.msg == The messag is the Reason for clearing (remove, store, user interaction...)
- Msg.value == String, name of the class whose cache should be cleared
- Msg.additional == always null
- Msg.ttl == 30 sec - shoule be enought time for the message to be processed by all nodes
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen de.caluga.morphium.MorphiumStorageListener
MorphiumStorageListener.UpdateTypes -
Feldübersicht
FelderVon Klasse geerbte Felder de.caluga.morphium.cache.AbstractCacheSynchronizer
listenerForType, listeners, log, morphium -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoiddetach()voidvoidvoidfirePostSendEvent(Class type, Msg m) voidfirePreSendEvent(Class type, Msg m) booleanbooleanprocess message, send answer if null is returned, no answer is sentvoidvoidvoidvoidpostRemove(Morphium m, Query q) voidpostRemove(Morphium m, Object r) voidpostRemove(Morphium m, List<Object> lst) voidvoidvoidpostUpdate(Morphium m, Class cls, Enum updateType) voidvoidvoidvoidvoidvoidvoidsendClearAllMessage(String reason) voidsendClearMessage(Class type, String reason) voidsendClearMessage(Class type, String reason, boolean force) sends message if necessaryvoidsendClearMessage(String reason, Map<Object, Boolean> isNew) voidsetCommitMessage(boolean msg) Von Klasse geerbte Methoden de.caluga.morphium.cache.AbstractCacheSynchronizer
addSyncListener, addSyncListener, firePostClearEvent, firePreClearEvent, removeSyncListener, removeSyncListenerVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden de.caluga.morphium.messaging.MessageListener
markAsProcessedBeforeExec
-
Felddetails
-
CACHE_SYNC_TYPE
- Siehe auch:
-
CACHE_SYNC_RECORD
- Siehe auch:
-
-
Konstruktordetails
-
MessagingCacheSynchronizer
- Parameter:
msg- - primary messaging, will attach to and send messages overmorphium- - the underlying morphium instance
-
-
Methodendetails
-
sendClearMessage
-
sendClearMessage
-
sendClearMessage
sends message if necessary- Parameter:
type- - typereason- - reason
-
detach
public void detach() -
isAttached
public boolean isAttached() -
sendClearAllMessage
-
preStore
- Angegeben von:
preStorein SchnittstelleMorphiumStorageListener<Object>- Löst aus:
MorphiumAccessVetoException
-
preStore
- Angegeben von:
preStorein SchnittstelleMorphiumStorageListener<Object>- Löst aus:
MorphiumAccessVetoException
-
postStore
- Angegeben von:
postStorein SchnittstelleMorphiumStorageListener<Object>
-
postStore
- Angegeben von:
postStorein SchnittstelleMorphiumStorageListener<Object>- Löst aus:
MorphiumAccessVetoException
-
postDrop
- Angegeben von:
postDropin SchnittstelleMorphiumStorageListener<Object>
-
preDrop
- Angegeben von:
preDropin SchnittstelleMorphiumStorageListener<Object>
-
postRemove
- Angegeben von:
postRemovein SchnittstelleMorphiumStorageListener<Object>
-
postRemove
- Angegeben von:
postRemovein SchnittstelleMorphiumStorageListener<Object>
-
firePostSendEvent
-
firePreSendEvent
- Löst aus:
CacheSyncVetoException
-
preRemove
- Angegeben von:
preRemovein SchnittstelleMorphiumStorageListener<Object>- Löst aus:
MorphiumAccessVetoException
-
preRemove
- Angegeben von:
preRemovein SchnittstelleMorphiumStorageListener<Object>- Löst aus:
MorphiumAccessVetoException
-
postLoad
- Angegeben von:
postLoadin SchnittstelleMorphiumStorageListener<Object>- Löst aus:
MorphiumAccessVetoException
-
postLoad
- Angegeben von:
postLoadin SchnittstelleMorphiumStorageListener<Object>- Löst aus:
MorphiumAccessVetoException
-
preUpdate
- Angegeben von:
preUpdatein SchnittstelleMorphiumStorageListener<Object>- Löst aus:
MorphiumAccessVetoException
-
postRemove
- Angegeben von:
postRemovein SchnittstelleMorphiumStorageListener<Object>
-
postUpdate
- Angegeben von:
postUpdatein SchnittstelleMorphiumStorageListener<Object>
-
onMessage
Beschreibung aus Schnittstelle kopiert:MessageListenerprocess message, send answer if null is returned, no answer is sent- Angegeben von:
onMessagein SchnittstelleMessageListener
-
disableCommitMessages
public void disableCommitMessages() -
enableCommitMessages
public void enableCommitMessages() -
setCommitMessage
public void setCommitMessage(boolean msg) -
isCommitMessages
public boolean isCommitMessages()
-