public class CacheSynchronizer extends MorphiumStorageAdapter<Object> implements MessageListener
MorphiumStorageListener.UpdateTypes| Modifier and Type | Field and Description |
|---|---|
static String |
CACHE_SYNC_RECORD |
static String |
CACHE_SYNC_TYPE |
| Constructor and Description |
|---|
CacheSynchronizer(Messaging msg,
Morphium morphium) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSyncListener(CacheSyncListener cl) |
void |
addSyncListener(Class type,
CacheSyncListener cl) |
void |
detach() |
void |
firePostClearEvent(Class type,
Msg m) |
void |
firePostSendEvent(Class type,
Msg m) |
void |
firePreSendEvent(Class type,
Msg m) |
boolean |
isAttached() |
Msg |
onMessage(Messaging msg,
Msg m)
process message, send answer
if null is returned, no answer is sent
|
void |
postDrop(Morphium m,
Class cls) |
void |
postRemove(Morphium m,
Query q) |
void |
postStore(Morphium m,
Object r,
boolean isNew) |
void |
postUpdate(Morphium m,
Class cls,
Enum updateType) |
void |
preDrop(Morphium m,
Class cls) |
void |
removeSyncListener(CacheSyncListener cl) |
void |
removeSyncListener(Class type,
CacheSyncListener cl) |
void |
sendClearAllMessage(String reason) |
void |
sendClearMessage(Class type,
String reason)
sends message if necessary
|
void |
sendClearMessage(Object record,
String reason,
boolean isNew) |
postLoad, postRemove, preDelete, preRemove, preStore, preUpdatepublic static final String CACHE_SYNC_TYPE
public static final String CACHE_SYNC_RECORD
public void addSyncListener(CacheSyncListener cl)
public void removeSyncListener(CacheSyncListener cl)
public void addSyncListener(Class type, CacheSyncListener cl)
public void removeSyncListener(Class type, CacheSyncListener cl)
public void firePreSendEvent(Class type, Msg m) throws CacheSyncVetoException
CacheSyncVetoExceptionpublic void sendClearMessage(Class type, String reason)
type - - typereason - - reasonpublic void detach()
public boolean isAttached()
public void sendClearAllMessage(String reason)
public void postStore(Morphium m, Object r, boolean isNew)
postStore in interface MorphiumStorageListener<Object>postStore in class MorphiumStorageAdapter<Object>public void postDrop(Morphium m, Class cls)
postDrop in interface MorphiumStorageListener<Object>postDrop in class MorphiumStorageAdapter<Object>public void preDrop(Morphium m, Class cls)
preDrop in interface MorphiumStorageListener<Object>preDrop in class MorphiumStorageAdapter<Object>public void postRemove(Morphium m, Query q)
postRemove in interface MorphiumStorageListener<Object>postRemove in class MorphiumStorageAdapter<Object>public void postUpdate(Morphium m, Class cls, Enum updateType)
postUpdate in interface MorphiumStorageListener<Object>postUpdate in class MorphiumStorageAdapter<Object>public Msg onMessage(Messaging msg, Msg m)
MessageListeneronMessage in interface MessageListenerCopyright © 2013. All rights reserved.