CachePeer supporting transactions.
| Modifier and Type | Field and Description |
|---|---|
| private final Ehcache |
| Access | Constructor and Description |
|---|---|
| public | TransactionalRMICachePeer(Ehcache
The cache attached to the peer cache, String The host name the peer is running on. hostName, Integer The port number on which the RMI Registry listens. Should be an unused port in
the range 1025 - 65536 rmiRegistryPort, Integer 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 - 65536 remoteObjectPort, Integer socketTimeoutMillis)Construct a new remote peer supporting transactions |
| Modifier and Type | Method and Description |
|---|---|
| public List | getElements(List<E>
a list of serializable values which represent keys keys)Overrides net. Implements net. |
| public List | getKeys()
Overrides net. Implements net. |
| public Element | getQuiet(Serializable
a serializable value key)Overrides net. Implements net. |
| public void | put(Element element)
Overrides net. Implements net. |
| public boolean | remove(Serializable key)
Overrides net. Implements net. |
| public void | removeAll()
Overrides net. Implements net. |
| public void | send(List<E>
a list of type eventMessages)EventMessageOverrides net. Implements net. EventMessages
This enables multiple messages to be delivered in one network invocation. |
| cache | back to summary |
|---|---|
| private final Ehcache cache | |
| TransactionalRMICachePeer | back to summary |
|---|---|
| public TransactionalRMICachePeer(Ehcache cache, String hostName, Integer rmiRegistryPort, Integer remoteObjectPort, Integer socketTimeoutMillis) throws RemoteException Construct a new remote peer supporting transactions
| |
| getElements | back to summary |
|---|---|
| public List Overrides net. Implements net. Doc from net. Gets a list of elements from the cache, for a list of keys, without updating Element statistics. Time to idle lifetimes are therefore not affected. Cache statistics are still updated. Callers should ideally first call this method with a small list of keys to gauge the size of a typical Element. Then a calculation can be made of the right number to request each time so as to optimise network performance and not cause an OutOfMemory error on this Cache. | |
| getKeys | back to summary |
|---|---|
| public List Overrides net. Implements net. Doc from net. Returns a list of all elements in the cache, whether or not they are expired. The returned keys are unique and can be considered a set. The List returned is not live. It is a copy. The time taken is O(n). On a single cpu 1.8Ghz P4, approximately 8ms is required for each 1000 entries. | |
| getQuiet | back to summary |
|---|---|
| public Element getQuiet(Serializable key) throws RemoteException Overrides net. Implements net. Doc from net. Gets an element from the cache, without updating Element statistics. Cache statistics are still updated.
| |
| put | back to summary |
|---|---|
| public void put(Element element) throws RemoteException, IllegalArgumentException, IllegalStateException Overrides net. Implements net. Doc from net. Puts an Element into the underlying cache without notifying listeners or updating statistics.
| |
| remove | back to summary |
|---|---|
| public boolean remove(Serializable key) throws RemoteException, IllegalStateException Overrides net. Implements net. Doc from net. Removes an Element from the underlying cache without notifying listeners or updating statistics.
| |
| removeAll | back to summary |
|---|---|
| public void removeAll() throws RemoteException, IllegalStateException Overrides net. Implements net. Doc from net. Removes all cached items.
| |
| send | back to summary |
|---|---|
| public void send(List<E> eventMessages) throws RemoteException Overrides net. Implements net. Doc from net. Send the cache peer with an ordered list of This enables multiple messages to be delivered in one network invocation.
| |