|
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(Object key)
Filter to get operations on underlying Store. |
Collection |
getAddedKeys()
getter to all keys pending addition to the store |
List<VersionAwareCommand> |
getCommands()
All ordered pending commands |
Collection |
getRemovedKeys()
getter to all keys pending deletion from the store |
int |
getSizeModifier()
The underlying store's size modifier. |
Object[] |
getUpdatedKeys()
All keys to pending keys to update |
boolean |
isRemoved(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(Object key)
Should the key still be transaction local, or locally pending deletion
key - the key
boolean isRemoved(Object key)
key - the key pending removal
Collection getAddedKeys()
Collection getRemovedKeys()
int getSizeModifier()
Plus all pending put commands, and minus all pending removals (dependent on whether their in the underlying store)
Store.getSize()List<VersionAwareCommand> getCommands()
Object[] getUpdatedKeys()
|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||