|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jcs.auxiliary.remote.RemoteCacheManager
public class RemoteCacheManager
An instance of RemoteCacheManager corresponds to one remote connection of a specific host and port. All RemoteCacheManager instances are monitored by the singleton RemoteCacheMonitor monitoring daemon for error detection and recovery.
Getting an instance of the remote cache has the effect of getting a handle on the remote server. Listeners are not registered with the server until a cache is requested from the manager.
Field Summary |
---|
Fields inherited from interface org.apache.jcs.engine.behavior.ICacheType |
---|
CACHE_HUB, DISK_CACHE, LATERAL_CACHE, REMOTE_CACHE |
Method Summary | |
---|---|
void |
addRemoteCacheListener(IRemoteCacheAttributes cattr,
IRemoteCacheListener listener)
Adds the remote cache listener to the underlying cache-watch service. |
void |
fixCaches(IRemoteCacheService remoteService,
IRemoteCacheObserver remoteWatch)
Fixes up all the caches managed by this cache manager. |
void |
freeCache(String name)
Releases. |
AuxiliaryCache |
getCache(IRemoteCacheAttributes cattr)
Gets a RemoteCacheNoWait from the RemoteCacheManager. |
AuxiliaryCache |
getCache(String cacheName)
Returns a remote cache for the given cache name. |
int |
getCacheType()
Gets the cacheType attribute of the RemoteCacheManager object |
IRemoteCacheAttributes |
getDefaultCattr()
Gets the defaultCattr attribute of the RemoteCacheManager object. |
static RemoteCacheManager |
getInstance(IRemoteCacheAttributes cattr,
ICompositeCacheManager cacheMgr,
ICacheEventLogger cacheEventLogger,
IElementSerializer elementSerializer)
Returns an instance of RemoteCacheManager for the given connection parameters. |
String |
getStats()
Gets the stats attribute of the RemoteCacheManager object |
protected void |
logApplicationEvent(String source,
String eventName,
String optionalDetails)
Logs an event if an event logger is configured. |
void |
release()
Shutdown all. |
void |
removeRemoteCacheListener(IRemoteCacheAttributes cattr)
Stops a listener. |
void |
removeRemoteCacheListener(IRemoteCacheAttributes cattr,
IRemoteCacheListener listener)
Removes a listener. |
void |
removeRemoteCacheListener(String cacheName)
Stops a listener. |
void |
shutdown()
Shutdown callback from composite cache manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public IRemoteCacheAttributes getDefaultCattr()
public void addRemoteCacheListener(IRemoteCacheAttributes cattr, IRemoteCacheListener listener) throws IOException
cattr
- The feature to be added to the RemoteCacheListener attributelistener
- The feature to be added to the RemoteCacheListener attribute
IOException
public void removeRemoteCacheListener(IRemoteCacheAttributes cattr, IRemoteCacheListener listener) throws IOException
cattr
- listener
-
IOException
public void removeRemoteCacheListener(IRemoteCacheAttributes cattr) throws IOException
cattr
-
IOException
public void removeRemoteCacheListener(String cacheName) throws IOException
cacheName
-
IOException
public static RemoteCacheManager getInstance(IRemoteCacheAttributes cattr, ICompositeCacheManager cacheMgr, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer)
Host and Port uniquely identify a manager instance.
Also starts up the monitoring daemon, if not already started.
If the connection cannot be established, zombie objects will be used for future recovery purposes.
cattr
- cacheMgr
- cacheEventLogger
- elementSerializer
-
public AuxiliaryCache getCache(String cacheName)
getCache
in interface AuxiliaryCacheManager
cacheName
-
public AuxiliaryCache getCache(IRemoteCacheAttributes cattr)
If the client is configured to register a listener, this call results on a listener being created if one isn't already registered with the remote cache for this region.
cattr
-
public void freeCache(String name) throws IOException
name
-
IOException
public String getStats()
public void release()
public void fixCaches(IRemoteCacheService remoteService, IRemoteCacheObserver remoteWatch)
remoteService
- remoteWatch
- public int getCacheType()
getCacheType
in interface ICacheType
public void shutdown()
shutdown
in interface IShutdownObserver
IShutdownObserver.shutdown()
protected void logApplicationEvent(String source, String eventName, String optionalDetails)
source
- eventName
- optionalDetails
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |