|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TransactionContext
A TransactionContext represents the data local to a Transaction that involves a transactional Cache.
It will queue operations (Commands
), filter read operations on the cache (as for
returning null on a get on a "to be removed" key).
It also provides access to the transaction orchestrator (like the TransactionManager
in case of JTA) to the deferred operations and other contextual information.
Method Summary | |
---|---|
void |
addCommand(Command command,
Element element)
Add a command to the current TransactionContext |
Element |
get(java.lang.Object key)
Filter to get operations on underlying Store. |
java.util.Collection |
getAddedKeys()
getter to all keys pending addition to the store |
java.util.List<VersionAwareCommand> |
getCommands()
All ordered pending commands |
java.util.Collection |
getRemovedKeys()
getter to all keys pending deletion from the store |
int |
getSizeModifier()
The underlying store's size modifier. |
java.util.Set<java.lang.Object> |
getUpdatedKeys()
All keys to pending keys to update |
boolean |
isRemoved(java.lang.Object key)
Queries the local tx context, whether the key is pending removal |
Method Detail |
---|
void addCommand(Command command, Element element)
command
- Command to be deferredelement
- Element the command impacts, may be nullElement get(java.lang.Object key)
Should the key still be transaction local, or locally pending deletion
key
- the key
boolean isRemoved(java.lang.Object key)
key
- the key pending removal
java.util.Collection getAddedKeys()
java.util.Collection getRemovedKeys()
int getSizeModifier()
Plus all pending put commands, and minus all pending removals (dependent on whether their in the underlying store)
Store.getSize()
java.util.List<VersionAwareCommand> getCommands()
java.util.Set<java.lang.Object> getUpdatedKeys()
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |