|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.apache.jcs.auxiliary.remote.server.RemoteCacheServer
Provides remote cache services.
Field Summary | |
private java.util.Hashtable |
cacheListenersMap
|
private CompositeCacheManager |
cacheManager
|
java.lang.String |
className
Description of the Field |
private java.util.Hashtable |
clusterListenersMap
|
private java.util.Hashtable |
idTypeMap
|
private int[] |
listenerId
|
private static org.apache.commons.logging.Log |
log
|
private int |
puts
|
protected IRemoteCacheServerAttributes |
rcsa
Description of the Field |
protected static boolean |
timing
Description of the Field |
Fields inherited from class java.rmi.server.UnicastRemoteObject |
|
Fields inherited from class java.rmi.server.RemoteServer |
|
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
protected |
RemoteCacheServer(IRemoteCacheServerAttributes rcsa)
Constructor for the RemoteCacheServer object |
Method Summary | |
void |
addCacheListener(ICacheListener listener)
Subscribes to all remote caches. |
void |
addCacheListener(java.lang.String cacheName,
ICacheListener listener)
Subscribes to the specified remote cache. |
private static void |
cleanupEventQMap(java.util.Map eventQMap)
Description of the Method |
protected CompositeCacheManager |
createCacheManager(java.lang.String prop)
Subclass can overrdie this method to create the specific cache manager. |
void |
dispose(java.lang.String cacheName)
Frees the specified remote cache. |
void |
dispose(java.lang.String cacheName,
byte requesterId)
Description of the Method |
ICacheElement |
get(java.lang.String cacheName,
java.io.Serializable key)
Returns a cache value from the specified remote cache; or null if the cache or key does not exist. |
private CacheListeners |
getCacheListeners(java.lang.String cacheName)
Returns the cache lsitener for the specified cache. |
private CacheListeners |
getClusterListeners(java.lang.String cacheName)
Gets the clusterListeners attribute of the RemoteCacheServer object |
private ICacheEventQueue[] |
getEventQList(CacheListeners cacheListeners,
byte requesterId)
Gets the eventQList attribute of the RemoteCacheServer object |
java.util.Set |
getGroupKeys(java.lang.String cacheName,
java.lang.String group)
Gets the set of keys of objects currently in the group |
private java.lang.String |
getRequester()
Gets the requester attribute of the RemoteCacheServer object |
java.lang.String |
getStats()
Gets the stats attribute of the RemoteCacheServer object |
protected void |
init(java.lang.String prop)
RMI Cache Server. |
private byte |
nextListenerId()
Returns the next generated listener id [0,255]. |
private static void |
p1(java.lang.String s)
Description of the Method |
void |
put(ICacheElement item)
Puts a cache bean to the remote cache and notifies all listeners which have a different host than the originating host; are currently subscribed to the related cache. |
void |
release()
Frees all remote caches. |
void |
remove(java.lang.String cacheName,
java.io.Serializable key)
Removes the given key from the specified remote cache. |
void |
remove(java.lang.String cacheName,
java.io.Serializable key,
byte requesterId)
Description of the Method |
void |
removeAll(java.lang.String cacheName)
Remove all keys from the sepcified remote cache. |
void |
removeAll(java.lang.String cacheName,
byte requesterId)
Description of the Method |
void |
removeCacheListener(ICacheListener listener)
Unsubscribes from all remote caches. |
void |
removeCacheListener(java.lang.String cacheName,
ICacheListener listener)
Unsubscribes from the specified remote cache. |
void |
shutdown()
Description of the Method |
void |
shutdown(java.lang.String host,
int port)
Description of the Method |
void |
unreferenced()
Called by the RMI runtime sometime after the runtime determines that the reference list, the list of clients referencing the remote object, becomes empty. |
void |
update(ICacheElement item)
Description of the Method |
void |
update(ICacheElement item,
byte requesterId)
Description of the Method |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final org.apache.commons.logging.Log log
protected static final boolean timing
public java.lang.String className
private int puts
private final java.util.Hashtable cacheListenersMap
private final java.util.Hashtable clusterListenersMap
private CompositeCacheManager cacheManager
private final java.util.Hashtable idTypeMap
private int[] listenerId
protected IRemoteCacheServerAttributes rcsa
Constructor Detail |
protected RemoteCacheServer(IRemoteCacheServerAttributes rcsa) throws java.io.IOException, java.rmi.NotBoundException
rcsa
-
java.io.IOException
java.rmi.NotBoundException
Method Detail |
protected void init(java.lang.String prop) throws java.io.IOException, java.rmi.NotBoundException
java.io.IOException
java.rmi.NotBoundException
protected CompositeCacheManager createCacheManager(java.lang.String prop)
private CacheListeners getCacheListeners(java.lang.String cacheName) throws java.io.IOException, java.rmi.NotBoundException
java.io.IOException
java.rmi.NotBoundException
private CacheListeners getClusterListeners(java.lang.String cacheName) throws java.io.IOException, java.rmi.NotBoundException
java.io.IOException
java.rmi.NotBoundException
public void put(ICacheElement item) throws java.io.IOException
java.io.IOException
public void update(ICacheElement item) throws java.io.IOException
update
in interface ICacheService
java.io.IOException
public void update(ICacheElement item, byte requesterId) throws java.io.IOException
update
in interface IRemoteCacheService
java.io.IOException
private ICacheEventQueue[] getEventQList(CacheListeners cacheListeners, byte requesterId)
public ICacheElement get(java.lang.String cacheName, java.io.Serializable key) throws java.io.IOException
get
in interface ICacheService
java.io.IOException
public java.util.Set getGroupKeys(java.lang.String cacheName, java.lang.String group)
getGroupKeys
in interface IRemoteCacheService
public void remove(java.lang.String cacheName, java.io.Serializable key) throws java.io.IOException
remove
in interface ICacheService
java.io.IOException
public void remove(java.lang.String cacheName, java.io.Serializable key, byte requesterId) throws java.io.IOException
remove
in interface IRemoteCacheService
java.io.IOException
public void removeAll(java.lang.String cacheName) throws java.io.IOException
removeAll
in interface ICacheService
java.io.IOException
public void removeAll(java.lang.String cacheName, byte requesterId) throws java.io.IOException
removeAll
in interface IRemoteCacheService
java.io.IOException
public void dispose(java.lang.String cacheName) throws java.io.IOException
dispose
in interface ICacheService
java.io.IOException
public void dispose(java.lang.String cacheName, byte requesterId) throws java.io.IOException
java.io.IOException
public void release() throws java.io.IOException
release
in interface ICacheService
java.io.IOException
private java.lang.String getRequester()
private static void cleanupEventQMap(java.util.Map eventQMap)
public void addCacheListener(java.lang.String cacheName, ICacheListener listener) throws java.io.IOException
addCacheListener
in interface ICacheObserver
cacheName
- the specified remote cache.listener
- object to notify for cache changes. must be synchronized
since there are remote calls involved.
java.io.IOException
public void addCacheListener(ICacheListener listener) throws java.io.IOException
addCacheListener
in interface ICacheObserver
listener
- The feature to be added to the CacheListener attribute
java.io.IOException
public void removeCacheListener(java.lang.String cacheName, ICacheListener listener) throws java.io.IOException
removeCacheListener
in interface ICacheObserver
listener
- existing subscriber.
java.io.IOException
public void removeCacheListener(ICacheListener listener) throws java.io.IOException
removeCacheListener
in interface ICacheObserver
listener
- existing subscriber.
java.io.IOException
public void shutdown() throws java.io.IOException
shutdown
in interface ICacheServiceAdmin
java.io.IOException
public void shutdown(java.lang.String host, int port) throws java.io.IOException
shutdown
in interface ICacheServiceAdmin
java.io.IOException
public void unreferenced()
unreferenced
in interface java.rmi.server.Unreferenced
private byte nextListenerId()
public java.lang.String getStats() throws java.io.IOException
getStats
in interface ICacheServiceAdmin
java.io.IOException
private static void p1(java.lang.String s)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |