public class CacheSynchronizer extends Object implements MorphiumStorageListener<Object>, 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) |
Msg |
onMessage(Msg m)
process message, send answer
if null is returned, no answer is sent
|
void |
postDrop(Class cls) |
void |
postLoad(Object o) |
void |
postRemove(Object r) |
void |
postRemove(Query q) |
void |
postStore(Object r,
boolean isNew) |
void |
postUpdate(Class cls,
Enum updateType) |
void |
preDelete(Object r) |
void |
preDrop(Class cls) |
void |
preRemove(Query q) |
void |
preStore(Object r,
boolean isNew) |
void |
preUpdate(Class cls,
Enum updateType) |
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) |
void |
setMessaging(Messaging msg) |
public 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 void sendClearAllMessage(String reason)
public void preStore(Object r, boolean isNew)
preStore in interface MorphiumStorageListener<Object>public void postStore(Object r, boolean isNew)
postStore in interface MorphiumStorageListener<Object>public void postRemove(Object r)
postRemove in interface MorphiumStorageListener<Object>public void preDelete(Object r)
preDelete in interface MorphiumStorageListener<Object>public void postDrop(Class cls)
postDrop in interface MorphiumStorageListener<Object>public void preDrop(Class cls)
preDrop in interface MorphiumStorageListener<Object>public void preRemove(Query q)
preRemove in interface MorphiumStorageListener<Object>public void postRemove(Query q)
postRemove in interface MorphiumStorageListener<Object>public void postLoad(Object o)
postLoad in interface MorphiumStorageListener<Object>public void preUpdate(Class cls, Enum updateType)
preUpdate in interface MorphiumStorageListener<Object>public void postUpdate(Class cls, Enum updateType)
postUpdate in interface MorphiumStorageListener<Object>public Msg onMessage(Msg m)
MessageListeneronMessage in interface MessageListenerpublic void setMessaging(Messaging msg)
setMessaging in interface MessageListenerCopyright © 2013. All Rights Reserved.