public class RemoteCacheManager extends java.lang.Object implements AuxiliaryCacheManager, IShutdownObserver
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.
CACHE_HUB, DISK_CACHE, LATERAL_CACHE, REMOTE_CACHE| Modifier and Type | Method and Description |
|---|---|
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(java.lang.String name)
Releases.
|
AuxiliaryCache |
getCache(IRemoteCacheAttributes cattr)
Gets a RemoteCacheNoWait from the RemoteCacheManager.
|
AuxiliaryCache |
getCache(java.lang.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.
|
java.lang.String |
getStats()
Gets the stats attribute of the RemoteCacheManager object
|
protected void |
logApplicationEvent(java.lang.String source,
java.lang.String eventName,
java.lang.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(java.lang.String cacheName)
Stops a listener.
|
void |
shutdown()
Shutdown callback from composite cache manager.
|
public IRemoteCacheAttributes getDefaultCattr()
public void addRemoteCacheListener(IRemoteCacheAttributes cattr, IRemoteCacheListener listener) throws java.io.IOException
cattr - The feature to be added to the RemoteCacheListener attributelistener - The feature to be added to the RemoteCacheListener attributejava.io.IOExceptionpublic void removeRemoteCacheListener(IRemoteCacheAttributes cattr, IRemoteCacheListener listener) throws java.io.IOException
cattr - listener - java.io.IOExceptionpublic void removeRemoteCacheListener(IRemoteCacheAttributes cattr) throws java.io.IOException
cattr - java.io.IOExceptionpublic void removeRemoteCacheListener(java.lang.String cacheName)
throws java.io.IOException
cacheName - java.io.IOExceptionpublic 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(java.lang.String cacheName)
getCache in interface AuxiliaryCacheManagercacheName - 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(java.lang.String name)
throws java.io.IOException
name - java.io.IOExceptionpublic java.lang.String getStats()
public void release()
public void fixCaches(IRemoteCacheService remoteService, IRemoteCacheObserver remoteWatch)
remoteService - remoteWatch - public int getCacheType()
getCacheType in interface ICacheTypepublic void shutdown()
shutdown in interface IShutdownObserverIShutdownObserver.shutdown()protected void logApplicationEvent(java.lang.String source,
java.lang.String eventName,
java.lang.String optionalDetails)
source - eventName - optionalDetails - Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.