|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.service.transaction.TransactionCoordinatorImpl
public final class TransactionCoordinatorImpl
Provides an implementation of TransactionCoordinator. This
class is thread safe, but the TransactionHandle returned by the
createTransaction method, and the Transaction associated with the handle, are not thread safe. Callers
should provide their own synchronization to insure that those objects are
not accessed concurrently from multiple threads.
Transactions created by this class can only support at most a single durable
participant — one that does not implement NonDurableTransactionParticipant. The join method
on transactions created using this class will throw UnsupportedOperationException if more than one durable participant attempts
to join the transaction.
The Transaction instances created by this class are not
synchronized; methods on those instances should only be called from a single
thread.
The default timeout for bounded transactions created by this class is
100ms. The default timeout for unbounded transactions created by this class
is Long.MAX_VALUE. These defaults may be overridden using the properties
TransactionCoordinator.TXN_TIMEOUT_PROPERTY and
TransactionCoordinator.TXN_UNBOUNDED_TIMEOUT_PROPERTY
respectively.
| Field Summary | |
|---|---|
static long |
BOUNDED_TIMEOUT_DEFAULT
The default for bounded timeout. |
static long |
UNBOUNDED_TIMEOUT_DEFAULT
The default for unbounded timeout. |
| Fields inherited from interface com.sun.sgs.impl.service.transaction.TransactionCoordinator |
|---|
TXN_DISABLE_PREPAREANDCOMMIT_OPT_PROPERTY, TXN_TIMEOUT_PROPERTY, TXN_UNBOUNDED_TIMEOUT_PROPERTY |
| Constructor Summary | |
|---|---|
TransactionCoordinatorImpl(Properties properties,
ProfileCollectorHandle collectorHandle)
Creates an instance of this class configured with the specified properties. |
|
| Method Summary | |
|---|---|
TransactionHandle |
createTransaction(long timeout)
Creates a new transaction, and returns a handle for managing it. |
long |
getDefaultTimeout()
Returns the default transaction timeout to use for bounded transactions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long BOUNDED_TIMEOUT_DEFAULT
public static final long UNBOUNDED_TIMEOUT_DEFAULT
| Constructor Detail |
|---|
public TransactionCoordinatorImpl(Properties properties,
ProfileCollectorHandle collectorHandle)
properties - the properties for configuring this servicecollectorHandle - the ProfileCollectorHandle used
to report participant detail
IllegalArgumentException - if the bounded or
unbounded timeout properties are less than 1| Method Detail |
|---|
public TransactionHandle createTransaction(long timeout)
ScheduledTask.UNBOUNDED is given, a
transaction will be created with the timeout value specified
by the property "com.sun.sgs.txn.timeout.unbounded".
createTransaction in interface TransactionCoordinatortimeout - the timeout, in milliseconds, to be used for this
transaction
public long getDefaultTimeout()
getDefaultTimeout in interface TransactionCoordinator
|
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 | |||||||||