stomp.jdo.distributed
Class StaticJDOCache
java.lang.Object
|
+--stomp.jdo.distributed.StaticJDOCache
- public class StaticJDOCache
- extends java.lang.Object
a singleton class that handles distributing object refresh and object deleted calls to clients.
- Author:
- Eric Lindauer
|
Method Summary |
static void |
addClientCache(CacheListener listener)
|
static void |
idsDeleted(java.util.Collection deletedIds,
CacheListener originator)
notifies all registered clients that the given set of ids have been
deleted from the db. |
static void |
refreshAll(java.util.Collection objectIds,
CacheListener originator)
this method is not synchronized as it would become very deadlock-prone. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StaticJDOCache
public StaticJDOCache()
addClientCache
public static void addClientCache(CacheListener listener)
idsDeleted
public static void idsDeleted(java.util.Collection deletedIds,
CacheListener originator)
- notifies all registered clients that the given set of ids have been
deleted from the db.
refreshAll
public static void refreshAll(java.util.Collection objectIds,
CacheListener originator)
- this method is not synchronized as it would become very deadlock-prone.
Imagine a client that responds to one object changing by changing
another persistent object. This would result in a callback to
this object to refresh, which would run into the lock already obtained earlier
( the remote-ness of the calls masks the fact that we are still in the
same "thread", tricking java's synchronization mechanism ).