ehcache

net.sf.ehcache.transaction.xa
Class PreparedContextImpl

java.lang.Object
  extended by net.sf.ehcache.transaction.xa.PreparedContextImpl
All Implemented Interfaces:
PreparedContext

public class PreparedContextImpl
extends java.lang.Object
implements PreparedContext

Author:
nelrahma

Constructor Summary
PreparedContextImpl()
           
 
Method Summary
 void addCommand(VersionAwareCommand command)
          Add prepared command
 java.util.List<PreparedCommand> getPreparedCommands()
          Return list of prepared commands
 java.util.Set<java.lang.Object> getUpdatedKeys()
          return set of keys associated with prepared commands
 boolean isCommitted()
          Checks whether the transaction branch associated with this context was commited internally
 boolean isRolledBack()
          Checks whether the transaction branch associated with this context was rolled back internally
 void setCommitted(boolean commited)
          Marks the transaction branch associated with this context as commited
 void setRolledBack(boolean rolledBack)
          Marks the transaction branch associated with this context as rolled back
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreparedContextImpl

public PreparedContextImpl()
Method Detail

addCommand

public void addCommand(VersionAwareCommand command)
Add prepared command

Specified by:
addCommand in interface PreparedContext
Parameters:
command - the command to be added to the queue

getPreparedCommands

public java.util.List<PreparedCommand> getPreparedCommands()
Return list of prepared commands

Specified by:
getPreparedCommands in interface PreparedContext
Returns:
all commands from the queue

getUpdatedKeys

public java.util.Set<java.lang.Object> getUpdatedKeys()
return set of keys associated with prepared commands

Specified by:
getUpdatedKeys in interface PreparedContext
Returns:
a set of keys to be updated (put or remove)

isRolledBack

public boolean isRolledBack()
Checks whether the transaction branch associated with this context was rolled back internally

Specified by:
isRolledBack in interface PreparedContext
Returns:
true, if transaction was roleld back internally

isCommitted

public boolean isCommitted()
Checks whether the transaction branch associated with this context was commited internally

Specified by:
isCommitted in interface PreparedContext
Returns:
true, if transaction was commited internally

setRolledBack

public void setRolledBack(boolean rolledBack)
Marks the transaction branch associated with this context as rolled back

Specified by:
setRolledBack in interface PreparedContext
Parameters:
rolledBack - true, if was rolled back, false otherwise

setCommitted

public void setCommitted(boolean commited)
Marks the transaction branch associated with this context as commited

Specified by:
setCommitted in interface PreparedContext
Parameters:
commited - true, if was commited, false otherwise

ehcache

true