|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jcs.auxiliary.remote.RemoteCache
Client proxy for an RMI remote cache.
Field Summary | |
(package private) IElementAttributes |
attr
|
(package private) java.lang.String |
cacheName
|
private IRemoteCacheAttributes |
irca
|
private static org.apache.commons.logging.Log |
log
|
private IRemoteCacheService |
remote
|
Fields inherited from interface org.apache.jcs.engine.behavior.ICacheType |
CACHE_HUB, DISK_CACHE, LATERAL_CACHE, REMOTE_CACHE |
Constructor Summary | |
RemoteCache(IRemoteCacheAttributes cattr,
IRemoteCacheService remote)
Constructor for the RemoteCache object |
Method Summary | |
void |
dispose()
Synchronously dispose the remote cache; if failed, replace the remote handle with a zombie. |
void |
fixCache(IRemoteCacheService remote)
Replaces the current remote cache service handle with the given handle. |
ICacheElement |
get(java.io.Serializable key)
Synchronously get from the remote cache; if failed, replace the remote handle with a zombie. |
java.lang.String |
getCacheName()
Gets the cacheName attribute of the RemoteCache object |
int |
getCacheType()
Gets the cacheType attribute of the RemoteCache object |
IElementAttributes |
getElementAttributes()
Gets the attributes attribute of the RemoteCache object |
java.util.Set |
getGroupKeys(java.lang.String groupName)
|
int |
getSize()
Returns the current cache size. |
java.lang.String |
getStats()
Gets the stats attribute of the RemoteCache object |
int |
getStatus()
Returns the cache status. |
private void |
handleException(java.lang.Exception ex,
java.lang.String msg)
Handles exception by disabling the remote cache service before re-throwing the exception in the form of an IOException. |
boolean |
remove(java.io.Serializable key)
Synchronously remove from the remote cache; if failed, replace the remote handle with a zombie. |
void |
removeAll()
Synchronously removeAll from the remote cache; if failed, replace the remote handle with a zombie. |
private java.io.Serializable |
sanitized(java.io.Serializable s)
Wraps a non JDK object into a MarshalledObject, so that we can avoid unmarshalling the real object on the remote side. |
void |
setElementAttributes(IElementAttributes attr)
Sets the attributes attribute of the RemoteCache object |
java.lang.String |
toString()
Description of the Method |
void |
update(ICacheElement ce)
Description of the Method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final org.apache.commons.logging.Log log
final java.lang.String cacheName
private IRemoteCacheService remote
private IRemoteCacheAttributes irca
IElementAttributes attr
Constructor Detail |
public RemoteCache(IRemoteCacheAttributes cattr, IRemoteCacheService remote)
cattr
- remote
- Method Detail |
public java.lang.String toString()
public void setElementAttributes(IElementAttributes attr)
attr
- The new attributes valuepublic IElementAttributes getElementAttributes()
public void update(ICacheElement ce) throws java.io.IOException
update
in interface ICache
java.io.IOException
public ICacheElement get(java.io.Serializable key) throws java.io.IOException
get
in interface ICache
java.io.IOException
public java.util.Set getGroupKeys(java.lang.String groupName) throws java.rmi.RemoteException
java.rmi.RemoteException
private java.io.Serializable sanitized(java.io.Serializable s) throws java.io.IOException
java.io.IOException
public boolean remove(java.io.Serializable key) throws java.io.IOException
remove
in interface ICache
java.io.IOException
public void removeAll() throws java.io.IOException
removeAll
in interface ICache
java.io.IOException
public void dispose() throws java.io.IOException
dispose
in interface ICache
java.io.IOException
public int getStatus()
getStatus
in interface ICache
public java.lang.String getStats()
public int getSize()
getSize
in interface ICache
public int getCacheType()
getCacheType
in interface ICacheType
public java.lang.String getCacheName()
getCacheName
in interface ICache
public void fixCache(IRemoteCacheService remote)
private void handleException(java.lang.Exception ex, java.lang.String msg) throws java.io.IOException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |