|
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 | |
---|---|
List |
getElements(List keys)
Gets a list of elements from the cache, for a list of keys, without updating Element statistics. |
String |
getGuid()
Gets the globally unique id for the underlying Cache instance. |
List |
getKeys()
Returns a list of all elements in the cache, whether or not they are expired. |
String |
getName()
Gets the cache name. |
Element |
getQuiet(Serializable key)
Gets an element from the cache, without updating Element statistics. |
String |
getUrl()
The URL for the remote replicator to connect. |
String |
getUrlBase()
The URL base for the remote replicator to connect. |
void |
put(Element element)
Put an element in the cache. |
boolean |
remove(Serializable key)
Removes an Element from the Cache. |
void |
removeAll()
Removes all cached items. |
void |
send(List eventMessages)
Send the cache peer with an ordered list of EventMessage s. |
Method Detail |
---|
void put(Element element) throws IllegalArgumentException, IllegalStateException, RemoteException
element
-
IllegalStateException
- if the cache is not Status.STATUS_ALIVE
IllegalArgumentException
- if the element is null
RemoteException
boolean remove(Serializable key) throws IllegalStateException, RemoteException
Element
from the Cache. This also removes it from any
stores it may be in.
key
-
IllegalStateException
- if the cache is not Status.STATUS_ALIVE
RemoteException
void removeAll() throws RemoteException, IllegalStateException
IllegalStateException
- if the cache is not Status.STATUS_ALIVE
RemoteException
void send(List eventMessages) throws RemoteException
EventMessage
s.
This enables multiple messages to be delivered in one network invocation.
eventMessages
- a list of type EventMessage
RemoteException
String getName() throws RemoteException
RemoteException
String getGuid() throws RemoteException
Cache
instance.
RemoteException
String getUrl() throws RemoteException
RemoteException
String getUrlBase() throws RemoteException
RemoteException
List getKeys() throws RemoteException
Object
keys
RemoteException
Element getQuiet(Serializable key) throws RemoteException
key
- a serializable value
RemoteException
List getElements(List keys) throws RemoteException
keys
- a list of serializable values which represent keys
RemoteException
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |