|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.rmi.server.RemoteObject java.rmi.server.RemoteServer java.rmi.server.UnicastRemoteObject net.sf.ehcache.distribution.RMICachePeer net.sf.ehcache.distribution.TransactionalRMICachePeer
public class TransactionalRMICachePeer
An RMI based implementation of CachePeer
supporting transactions.
Field Summary |
---|
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Constructor Summary | |
---|---|
TransactionalRMICachePeer(Ehcache cache,
String hostName,
Integer rmiRegistryPort,
Integer remoteObjectPort,
Integer socketTimeoutMillis)
Construct a new remote peer supporting transactions |
Method Summary | |
---|---|
List |
getElements(List keys)
Gets a list of elements from the cache, for a list of keys, without updating Element statistics. |
List |
getKeys()
Returns a list of all elements in the cache, whether or not they are expired. |
Element |
getQuiet(Serializable key)
Gets an element from the cache, without updating Element statistics. |
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 EventMessage s
This enables multiple messages to be delivered in one network invocation. |
Methods inherited from class net.sf.ehcache.distribution.RMICachePeer |
---|
getGuid, getName, getUrl, getUrlBase, toString |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
---|
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
---|
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
---|
equals, getRef, hashCode, toStub |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TransactionalRMICachePeer(Ehcache cache, String hostName, Integer rmiRegistryPort, Integer remoteObjectPort, Integer socketTimeoutMillis) throws RemoteException
cache
- The cache attached to the peerhostName
- The host name the peer is running on.rmiRegistryPort
- The port number on which the RMI Registry listens. Should be an unused port in
the range 1025 - 65536remoteObjectPort
- the port number on which the remote objects bound in the registry receive calls.
This defaults to a free port if not specified.
Should be an unused port in the range 1025 - 65536socketTimeoutMillis
-
RemoteException
Method Detail |
---|
public List getKeys() throws RemoteException
RMICachePeer
getKeys
in interface CachePeer
getKeys
in class RMICachePeer
Object
keys
RemoteException
public Element getQuiet(Serializable key) throws RemoteException
RMICachePeer
getQuiet
in interface CachePeer
getQuiet
in class RMICachePeer
key
- a serializable value
RemoteException
public List getElements(List keys) throws RemoteException
RMICachePeer
getElements
in interface CachePeer
getElements
in class RMICachePeer
keys
- a list of serializable values which represent keys
RemoteException
public void put(Element element) throws RemoteException, IllegalArgumentException, IllegalStateException
RMICachePeer
put
in interface CachePeer
put
in class RMICachePeer
IllegalArgumentException
- if the element is null
IllegalStateException
- if the cache is not Status.STATUS_ALIVE
RemoteException
public boolean remove(Serializable key) throws RemoteException, IllegalStateException
RMICachePeer
remove
in interface CachePeer
remove
in class RMICachePeer
IllegalStateException
- if the cache is not Status.STATUS_ALIVE
RemoteException
public void removeAll() throws RemoteException, IllegalStateException
RMICachePeer
removeAll
in interface CachePeer
removeAll
in class RMICachePeer
IllegalStateException
- if the cache is not Status.STATUS_ALIVE
RemoteException
public void send(List eventMessages) throws RemoteException
RMICachePeer
EventMessage
s
This enables multiple messages to be delivered in one network invocation.
send
in interface CachePeer
send
in class RMICachePeer
eventMessages
- a list of type EventMessage
RemoteException
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |