public abstract class AbstractRemoteAuxiliaryCache extends AbstractAuxiliaryCacheEventLogging implements IRemoteCacheClient
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
cacheName
The cacheName
|
cacheEventLogger, elementSerializer, keyMatcherCACHE_HUB, DISK_CACHE, LATERAL_CACHE, REMOTE_CACHE| Constructor and Description |
|---|
AbstractRemoteAuxiliaryCache(IRemoteCacheAttributes cattr,
IRemoteCacheService remote,
IRemoteCacheListener listener)
Creates the base.
|
| Modifier and Type | Method and Description |
|---|---|
void |
fixCache(IRemoteCacheService restoredRemote)
Replaces the current remote cache service handle with the given handle.
|
AuxiliaryCacheAttributes |
getAuxiliaryCacheAttributes()
This returns the generic attributes for an auxiliary cache.
|
java.lang.String |
getCacheName()
Gets the cacheName attribute of the RemoteCache object.
|
int |
getCacheType()
Gets the cacheType attribute of the RemoteCache object
|
java.util.Set |
getGroupKeys(java.lang.String groupName)
Returns all the keys for a group.
|
IRemoteCacheListener |
getListener()
Allows other member of this package to access the listerner.
|
long |
getListenerId()
Gets the listenerId attribute of the RemoteCacheListener object
|
protected IRemoteCacheAttributes |
getRemoteCacheAttributes() |
protected IRemoteCacheListener |
getRemoteCacheListener() |
protected IRemoteCacheService |
getRemoteCacheService() |
int |
getSize()
Returns the current cache size.
|
IStats |
getStatistics() |
java.lang.String |
getStats()
Gets the stats attribute of the RemoteCache object.
|
int |
getStatus()
Returns the cache status.
|
ICacheElement |
getUsingPool(java.io.Serializable key)
This allows gets to timeout in case of remote server machine shutdown.
|
protected abstract void |
handleException(java.lang.Exception ex,
java.lang.String msg,
java.lang.String eventName)
Custom exception handling some children.
|
protected void |
processDispose()
Synchronously dispose the remote cache; if failed, replace the remote handle with a zombie.
|
protected ICacheElement |
processGet(java.io.Serializable key)
Synchronously get from the remote cache; if failed, replace the remote handle with a zombie.
|
java.util.Map |
processGetMatching(java.lang.String pattern)
Calls get matching on the server.
|
protected java.util.Map |
processGetMultiple(java.util.Set keys)
Gets multiple items from the cache based on the given set of keys.
|
protected boolean |
processRemove(java.io.Serializable key)
Synchronously remove from the remote cache; if failed, replace the remote handle with a
zombie.
|
protected void |
processRemoveAll()
Synchronously removeAll from the remote cache; if failed, replace the remote handle with a
zombie.
|
protected void |
processUpdate(ICacheElement ce)
Serializes the object and then calls update on the remote server with the byte array.
|
void |
setListenerId(long id)
let the remote cache set a listener_id.
|
protected void |
setRemoteCacheAttributes(IRemoteCacheAttributes remoteCacheAttributes) |
protected void |
setRemoteCacheListener(IRemoteCacheListener remoteCacheListener) |
protected void |
setRemoteCacheService(IRemoteCacheService remote) |
dispose, disposeWithEventLogging, get, getMatching, getMatchingWithEventLogging, getMultiple, getMultipleWithEventLogging, getWithEventLogging, remove, removeAll, removeAllWithEventLogging, removeWithEventLogging, update, updateWithEventLoggingcreateICacheEvent, createICacheEvent, getCacheEventLogger, getElementSerializer, getEventLoggingExtraInfo, getKeyMatcher, logApplicationEvent, logError, logICacheEvent, setCacheEventLogger, setElementSerializer, setKeyMatcherclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetCacheEventLogger, setElementSerializerdispose, get, getMatching, getMultiple, remove, removeAll, setKeyMatcher, updatepublic AbstractRemoteAuxiliaryCache(IRemoteCacheAttributes cattr, IRemoteCacheService remote, IRemoteCacheListener listener)
cattr - remote - listener - protected void processDispose()
throws java.io.IOException
processDispose in class AbstractAuxiliaryCacheEventLoggingjava.io.IOExceptionprotected ICacheElement processGet(java.io.Serializable key) throws java.io.IOException
Use threadpool to timeout if a value is set for GetTimeoutMillis
If we are a cluster client, we need to leave the Element in its serialized form. Cluster clients cannot deserialize objects. Cluster clients get ICacheElementSerialized objects from other remote servers.
processGet in class AbstractAuxiliaryCacheEventLoggingkey - java.io.IOExceptionpublic ICacheElement getUsingPool(java.io.Serializable key) throws java.io.IOException
key - java.io.IOExceptionpublic java.util.Map processGetMatching(java.lang.String pattern)
throws java.io.IOException
processGetMatching in class AbstractAuxiliaryCacheEventLoggingpattern - java.io.IOExceptionprotected java.util.Map processGetMultiple(java.util.Set keys)
throws java.io.IOException
processGetMultiple in class AbstractAuxiliaryCacheEventLoggingkeys - java.io.IOExceptionprotected boolean processRemove(java.io.Serializable key)
throws java.io.IOException
processRemove in class AbstractAuxiliaryCacheEventLoggingkey - java.io.IOExceptionprotected void processRemoveAll()
throws java.io.IOException
processRemoveAll in class AbstractAuxiliaryCacheEventLoggingjava.io.IOExceptionprotected void processUpdate(ICacheElement ce) throws java.io.IOException
processUpdate in class AbstractAuxiliaryCacheEventLoggingce - java.io.IOExceptionpublic java.util.Set getGroupKeys(java.lang.String groupName)
throws java.rmi.RemoteException,
java.io.IOException
getGroupKeys in interface AuxiliaryCachegroupName - java.rmi.RemoteExceptionjava.io.IOExceptionpublic IRemoteCacheListener getListener()
getListener in interface IRemoteCacheClientpublic void setListenerId(long id)
id - The new listenerId valuepublic long getListenerId()
getListenerId in interface IRemoteCacheClientpublic int getSize()
protected abstract void handleException(java.lang.Exception ex,
java.lang.String msg,
java.lang.String eventName)
throws java.io.IOException
ex - msg - eventName - java.io.IOExceptionpublic java.lang.String getStats()
public IStats getStatistics()
getStatistics in interface AuxiliaryCachepublic int getStatus()
public void fixCache(IRemoteCacheService restoredRemote)
fixCache in interface IRemoteCacheClientrestoredRemote - IRemoteCacheService -- the remote server or proxy to the remote serverpublic int getCacheType()
getCacheType in interface ICacheTypepublic java.lang.String getCacheName()
getCacheName in interface ICacheprotected void setRemoteCacheService(IRemoteCacheService remote)
remote - the remote to setprotected IRemoteCacheService getRemoteCacheService()
public AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
AuxiliaryCachegetAuxiliaryCacheAttributes in interface AuxiliaryCacheprotected void setRemoteCacheAttributes(IRemoteCacheAttributes remoteCacheAttributes)
remoteCacheAttributes - the remoteCacheAttributes to setprotected IRemoteCacheAttributes getRemoteCacheAttributes()
protected void setRemoteCacheListener(IRemoteCacheListener remoteCacheListener)
remoteCacheListener - the remoteCacheListener to setprotected IRemoteCacheListener getRemoteCacheListener()
Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.