net.sf.ehcache.distribution
public class RMICachePeer extends UnicastRemoteObject implements CachePeer, Remote
CachePeer
.
This class features a customised RMIClientSocketFactory which enables socket timeouts to be configured.
Version: $Id: RMICachePeer.java 52 2006-04-24 14:50:03Z gregluck $
UNKNOWN: FieldCanBeLocal
Constructor Summary | |
---|---|
RMICachePeer(Cache cache, String hostName, Integer port, Integer socketTimeoutMillis)
Construct a new remote peer.
|
Method Summary | |
---|---|
Cache | getBoundCacheInstance()
Gets the cache instance that this listener is bound to |
String | getGuid() |
String | getName()
Gets the cache name |
String | getUrl()
{@inheritDoc }
This implementation gives an URL which has meaning to the RMI remoting system.
|
String | getUrlBase()
{@inheritDoc }
This implementation gives an URL which has meaning to the RMI remoting system.
|
void | put(Element element)
Puts an Element into the underlying cache without notifying listeners or updating statistics.
|
boolean | remove(Serializable key)
Removes an Element from the underlying cache without notifying listeners or updating statistics.
|
void | removeAll()
Removes all cached items.
|
void | send(List eventMessages)
Send the cache peer with an ordered list of EventMessages
This enables multiple messages to be delivered in one network invocation. |
Parameters: cache hostName port socketTimeoutMillis
Throws: RemoteException
Returns: the URL, without the scheme, as a string e.g. //hostname:port/cacheName
Returns: the URL, without the scheme, as a string e.g. //hostname:port
Parameters: element
Throws: java.rmi.RemoteException IllegalArgumentException IllegalStateException
Parameters: key
Returns: true if the element was removed, false if it was not found in the cache
Throws: RemoteException IllegalStateException
Throws: IllegalStateException if the cache is not STATUS_ALIVE