|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.util.TransactionContext
com.sun.sgs.impl.service.channel.ChannelServiceImpl.Context
final class ChannelServiceImpl.Context
This transaction context maintains a per-channel list of
non-transactional tasks to perform when the transaction commits. A
task is added to the context by a ChannelImpl via the addChannelTaskOnCommit method. Such non-transactional tasks include
sending a notification to a channel server to modify the channel
membership list, or forwarding a send request to a set of channel
servers.
| 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 list containing pending updates, and flushes all committed contexts preceding prepared ones. |
void |
addChannelToService(BigInteger channelRefId)
Adds the specified channelRefId to the set of
locally-coordinated channels whose event queues need to be
serviced as a result of operations executed during this
context's associated transaction. |
void |
addTask(BigInteger channelRefId,
KernelRunnable task)
Adds the specified non-transactional task to the task
list of the given channelRefId. |
void |
commit()
Marks this transaction as committed and flushes all committed contexts preceding prepared ones. |
boolean |
prepare()
Marks this transaction as prepared, and if there are pending changes, adds this context to the context list 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 |
|---|
public void addTask(BigInteger channelRefId,
KernelRunnable task)
task to the task
list of the given channelRefId. If the transaction
commits, the task will be added to the channel's tasks queue.
public void addChannelToService(BigInteger channelRefId)
channelRefId to the set of
locally-coordinated channels whose event queues need to be
serviced as a result of operations executed during this
context's associated transaction. When this context is flushed, for each channel that needs to be serviced, a task to service the channel's event queue will be added to that channel coordinator's task queue.
channelRefId - a locally-coordinated channel that needs to
be servicedpublic boolean prepare()
false. Otherwise, if there are no pending
changes returns true indicating readonly status.
prepare in class TransactionContexttrue if this context's state is read-only,
false otherwisepublic void abort(boolean retryable)
abort in class TransactionContextretryable - if true, the transaction's abort cause
is a retryable exceptionpublic void commit()
commit in class TransactionContext
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||