com.sun.sgs.impl.service.session
Class ClientSessionServiceImpl.Context

java.lang.Object
  extended by com.sun.sgs.impl.util.TransactionContext
      extended by com.sun.sgs.impl.service.session.ClientSessionServiceImpl.Context
Enclosing class:
ClientSessionServiceImpl

final class ClientSessionServiceImpl.Context
extends TransactionContext


Field Summary
 
Fields inherited from class com.sun.sgs.impl.util.TransactionContext
isCommitted, isPrepared, txn
 
Method Summary
 void abort(boolean retryable)
          Removes the context from the context queue containing pending actions, and checks for flushing committed contexts.
(package private)  void addCommitAction(BigInteger sessionRefId, ClientSessionServiceImpl.Action action, boolean first)
          Adds an action for the specified session to be performed when the associated transaction commits.
 void commit()
          Marks this transaction as committed, and checks for flushing committed contexts.
 boolean prepare()
          Marks this transaction as prepared, and if there are pending changes, adds this context to the context queue and returns false.
 
Methods inherited from class com.sun.sgs.impl.util.TransactionContext
getTransaction, isPrepared, prepareAndCommit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addCommitAction

void addCommitAction(BigInteger sessionRefId,
                     ClientSessionServiceImpl.Action action,
                     boolean first)
Adds an action for the specified session to be performed when the associated transaction commits. If first is true, then the action is added as the first commit action for the specified session.


prepare

public boolean prepare()
Marks this transaction as prepared, and if there are pending changes, adds this context to the context queue and returns false. Otherwise, if there are no pending changes returns true indicating readonly status.

Overrides:
prepare in class TransactionContext
Returns:
true if this context's state is read-only, false otherwise

abort

public void abort(boolean retryable)
Removes the context from the context queue containing pending actions, and checks for flushing committed contexts.

Specified by:
abort in class TransactionContext
Parameters:
retryable - if true, the transaction's abort cause is a retryable exception

commit

public void commit()
Marks this transaction as committed, and checks for flushing committed contexts.

Specified by:
commit in class TransactionContext

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved