|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CachePeer
An interface for a cache peer to which updates are made remotely. The distribution mechanism is meant to be pluggable. The requirements of RMI force this interface to exten Remote and throw RemoteException.
It is acknowledged that not all implementations will use Remote. Remote is just a marker interface like Serializable, so nothing specific is required. Non-RMI implementations should be able to use this interface. Implementations not using RMI should
Method Summary | |
---|---|
java.util.List |
getElements(java.util.List keys)
Gets a list of elements from the cache, for a list of keys, without updating Element statistics. |
java.lang.String |
getGuid()
Gets the globally unique id for the underlying Cache instance. |
java.util.List |
getKeys()
Returns a list of all elements in the cache, whether or not they are expired. |
java.lang.String |
getName()
Gets the cache name. |
Element |
getQuiet(java.io.Serializable key)
Gets an element from the cache, without updating Element statistics. |
java.lang.String |
getUrl()
The URL for the remote replicator to connect. |
java.lang.String |
getUrlBase()
The URL base for the remote replicator to connect. |
void |
put(Element element)
Put an element in the cache. |
boolean |
remove(java.io.Serializable key)
Removes an Element from the Cache. |
void |
removeAll()
Removes all cached items. |
void |
send(java.util.List eventMessages)
Send the cache peer with an ordered list of EventMessage s. |
Method Detail |
---|
void put(Element element) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.rmi.RemoteException
element
-
java.lang.IllegalStateException
- if the cache is not Status.STATUS_ALIVE
java.lang.IllegalArgumentException
- if the element is null
java.rmi.RemoteException
boolean remove(java.io.Serializable key) throws java.lang.IllegalStateException, java.rmi.RemoteException
Element
from the Cache. This also removes it from any
stores it may be in.
key
-
java.lang.IllegalStateException
- if the cache is not Status.STATUS_ALIVE
java.rmi.RemoteException
void removeAll() throws java.rmi.RemoteException, java.lang.IllegalStateException
java.lang.IllegalStateException
- if the cache is not Status.STATUS_ALIVE
java.rmi.RemoteException
void send(java.util.List eventMessages) throws java.rmi.RemoteException
EventMessage
s.
This enables multiple messages to be delivered in one network invocation.
eventMessages
- a list of type EventMessage
java.rmi.RemoteException
java.lang.String getName() throws java.rmi.RemoteException
java.rmi.RemoteException
java.lang.String getGuid() throws java.rmi.RemoteException
Cache
instance.
java.rmi.RemoteException
java.lang.String getUrl() throws java.rmi.RemoteException
java.rmi.RemoteException
java.lang.String getUrlBase() throws java.rmi.RemoteException
java.rmi.RemoteException
java.util.List getKeys() throws java.rmi.RemoteException
Object
keys
java.rmi.RemoteException
Element getQuiet(java.io.Serializable key) throws java.rmi.RemoteException
key
- a serializable value
java.rmi.RemoteException
java.util.List getElements(java.util.List keys) throws java.rmi.RemoteException
keys
- a list of serializable values which represent keys
java.rmi.RemoteException
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |