javax.cache.Cache.Entry atomically, according to the defined
consistency of a Cache.
Any javax.cache.Cache.Entry mutations will not take effect until after
the EntryProcessor#process(MutableEntry, Object...) method has completed
execution.
If an exception is thrown by an EntryProcessor, a Caching Implementation
must wrap any Exception thrown wrapped in an EntryProcessorException. If this occurs no mutations will be made to the
javax.cache.Cache.Entry.
Implementations may execute EntryProcessors in situ, thus avoiding
locking, round-trips and expensive network transfers.
MutableEntry operationsjavax.cache.Cache.Entry access, via a call to
javax.cache.Cache.Entry#getValue(), will behave as if
Cache#get(Object) was called for the key. This includes updating
necessary statistics, consulting the configured ExpiryPolicy and loading
from a configured javax.cache.integration.CacheLoader.
javax.cache.Cache.Entry mutation, via a call to
MutableEntry#setValue(Object), will behave as if Cache#put(Object, Object) was called for the key. This includes updating
necessary statistics, consulting the configured ExpiryPolicy, notifying CacheEntryListeners and writing to a
configured CacheWriter.
javax.cache.Cache.Entry removal, via a call to
MutableEntry#remove(), will behave as if Cache#remove(Object)
was called for the key. This includes updating necessary statistics, notifying
CacheEntryListeners and causing a delete on a configured
CacheWriter.
As implementations may choose to execute EntryProcessors remotely,
EntryProcessors, together with specified parameters and return
values, may be required to implement java.io.Serializable.
MutableEntry operations performed by one EntryProcessorEntryProcessor calls:
MutableEntry#getValue()MutableEntry#setValue(Object)MutableEntry#getValue()MutableEntry#setValue(Object)Cache effects:
EntryProcessor calls:
MutableEntry#getValue()MutableEntry#remove()}MutableEntry#getValue()MutableEntry#setValue(Object)Cache effects:
EntryProcessor calls:
MutableEntry#getValue()MutableEntry#setValue(Object)}MutableEntry#getValue()MutableEntry#setValue(Object)MutableEntry#remove()Cache effects:
| Modifier and Type | Method and Description |
|---|---|
| public T | Returns: the user-defined result of the processing, if any.the entry entry, Object... a number of arguments to the process. arguments)Process an entry. |
| process | back to summary |
|---|---|
| public T process(MutableEntry<K, V> entry, Object... arguments) throws EntryProcessorException Process an entry.
| |