|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.kernel.ContextResolver
final class ContextResolver
This class is used to resolve the state associated with the current task's context, including its owner and active transaction.
| Method Summary | ||
|---|---|---|
(package private) static void |
clearCurrentTransaction(Transaction transaction)
Clears the currently active Transaction. |
|
static ChannelManager |
getChannelManager()
Returns the ChannelManager used in this context. |
|
(package private) static KernelContext |
getContext()
Package-private method used to get the current context. |
|
(package private) static Identity |
getCurrentOwner()
Returns the current owner of the work being done by this thread. |
|
(package private) static Transaction |
getCurrentTransaction()
Returns the current Transaction, throwing an exception
if there is no currently active transaction or if the currently
active transaction has timed out. |
|
static DataManager |
getDataManager()
Returns the DataManager used in this context. |
|
static
|
getManager(Class<T> type)
Returns the manager in this context that matches the given type. |
|
static TaskManager |
getTaskManager()
Returns the TaskManager used in this context. |
|
(package private) static boolean |
inTransaction()
Returns true if there is a current transaction, no matter
the state of that transaction. |
|
(package private) static boolean |
isCurrentTransaction()
Returns whether there is a currently active transaction. |
|
(package private) static void |
setCurrentTransaction(Transaction transaction)
Sets the current Transaction, throwing an exception if
there is already an active transaction. |
|
(package private) static void |
setTaskState(KernelContext ctx,
Identity owner)
Package-private method used to set task state. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ChannelManager getChannelManager()
ChannelManager used in this context.
ChannelManager.
IllegalStateException - if there is no available
ChannelManager in this
contextpublic static DataManager getDataManager()
DataManager used in this context.
DataManager.
IllegalStateException - if there is no available
DataManager in this
contextpublic static TaskManager getTaskManager()
TaskManager used in this context.
TaskManager.
IllegalStateException - if there is no available
TaskManager in this
contextpublic static <T> T getManager(Class<T> type)
T - the type of the managertype - the Class of the requested manager
ManagerNotFoundException - if no manager is found that matches
the given type
IllegalStateException - if there are no available managers
in this context
static void setTaskState(KernelContext ctx,
Identity owner)
Scheduler
ctx - the KernelContext for the current taskowner - the Identity that owns the current taskstatic KernelContext getContext()
AppKernelAppContextstatic Identity getCurrentOwner()
Identity that owns the current taskstatic Transaction getCurrentTransaction()
Transaction, throwing an exception
if there is no currently active transaction or if the currently
active transaction has timed out.
Transaction
TransactionNotActiveException - if there is no currently active
transaction
TransactionTimeoutException - if the transaction has timed outstatic boolean inTransaction()
true if there is a current transaction, no matter
the state of that transaction.
true if there is a current transactionstatic void setCurrentTransaction(Transaction transaction)
Transaction, throwing an exception if
there is already an active transaction.
transaction - the Transaction to set as currently
active
IllegalStateException - if there is already an active transactionstatic void clearCurrentTransaction(Transaction transaction)
Transaction. This is
typically done once a transaction has finished.
transaction - the Transaction to clear, which
must be the currently active transaction
IllegalStateException - if there is no currently active
transaction to clear
IllegalArgumentException - if the given Transaction
is not the active transactionstatic boolean isCurrentTransaction()
true if there is currently an active transaction,
false otherwise
|
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 | |||||||||