com.sun.sgs.impl.service.transaction
Interface TransactionCoordinator

All Known Implementing Classes:
TransactionCoordinatorImpl

public interface TransactionCoordinator

Defines an interface for managing transactions.


Field Summary
static String TXN_DISABLE_PREPAREANDCOMMIT_OPT_PROPERTY
          A property used to control whether we allow the prepareAndCommit optimization, where the final participant has prepareAndCommit called (one call) rather than prepare(), and at some later point commit().
static String TXN_TIMEOUT_PROPERTY
          The property used to specify the timeout value for transactions.
static String TXN_UNBOUNDED_TIMEOUT_PROPERTY
          The property used to specify the value for unbounded timeout.
 
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.
 

Field Detail

TXN_TIMEOUT_PROPERTY

static final String TXN_TIMEOUT_PROPERTY
The property used to specify the timeout value for transactions.

See Also:
Constant Field Values

TXN_UNBOUNDED_TIMEOUT_PROPERTY

static final String TXN_UNBOUNDED_TIMEOUT_PROPERTY
The property used to specify the value for unbounded timeout.

See Also:
Constant Field Values

TXN_DISABLE_PREPAREANDCOMMIT_OPT_PROPERTY

static final String TXN_DISABLE_PREPAREANDCOMMIT_OPT_PROPERTY
A property used to control whether we allow the prepareAndCommit optimization, where the final participant has prepareAndCommit called (one call) rather than prepare(), and at some later point commit().

The flag defaults to false.

See Also:
Constant Field Values
Method Detail

createTransaction

TransactionHandle createTransaction(long timeout)
Creates a new transaction, and returns a handle for managing it. If a timeout of ScheduledTask.UNBOUNDED is given, a transaction will be created with the timeout value specified by the property "com.sun.sgs.txn.timeout.unbounded".

Parameters:
timeout - the timeout, in milliseconds, to be used for this transaction
Returns:
a handle for managing the newly created transaction.

getDefaultTimeout

long getDefaultTimeout()
Returns the default transaction timeout to use for bounded transactions. This value is specified using the property "com.sun.sgs.txn.timeout"

Returns:
the default transaction timeout

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