com.metamatrix.platform.config.spi.xml
Class ConfigTransaction

java.lang.Object
  extended by com.metamatrix.platform.config.spi.xml.ConfigTransaction
Direct Known Subclasses:
XMLConfigurationTransaction

public class ConfigTransaction
extends java.lang.Object


Field Summary
static int NO_SERVER_INITIALIZATION_ACTION
           
static int SERVER_FORCE_INITIALIZATION
           
static int SERVER_INITIALIZATION
           
static int SERVER_SHUTDOWN
           
static int SERVER_STARTED
           
 
Constructor Summary
protected ConfigTransaction(TransactionID txnID, long defaultTimeoutSeconds)
           
 
Method Summary
 void addObjects(java.lang.Object key, java.lang.Object value)
          Call to add an object to the set of objects that changed during this transaction.
 void begin(java.lang.String principal, int reason, boolean readOnly)
          This method is implemented by this class so that the actual lock can be obtained prior to the transaction beginning.
 void commit()
          Complete the transaction represented by this TransactionObject.
 boolean contains(java.lang.Object key)
           
 int getAction()
           
 long getBeginTime()
           
 java.lang.String getLockAcquiredBy()
          Returns the name that holds the lock.
 java.lang.Object getObject(java.lang.Object key)
          Returns the objects that changed during this transaction.
 java.util.Collection getObjects()
          Returns the objects that changed during this transaction
 int getStatus()
          Obtain the status of the transaction associated with this object.
 TransactionID getTransactionID()
          Returns the transaction id that uniquely identifies this transaction
 boolean isReadOnly()
           
 void rollback()
          Roll back the transaction represented by this TransactionObject.
 void setAction(int actionPerformed)
           
 void setRollbackOnly()
          Modify the transaction such that the only possible outcome of the transaction is to roll back the transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_INITIALIZATION

public static final int SERVER_INITIALIZATION
See Also:
Constant Field Values

SERVER_SHUTDOWN

public static final int SERVER_SHUTDOWN
See Also:
Constant Field Values

SERVER_FORCE_INITIALIZATION

public static final int SERVER_FORCE_INITIALIZATION
See Also:
Constant Field Values

SERVER_STARTED

public static final int SERVER_STARTED
See Also:
Constant Field Values

NO_SERVER_INITIALIZATION_ACTION

public static final int NO_SERVER_INITIALIZATION_ACTION
See Also:
Constant Field Values
Constructor Detail

ConfigTransaction

protected ConfigTransaction(TransactionID txnID,
                            long defaultTimeoutSeconds)
Method Detail

getStatus

public int getStatus()
Obtain the status of the transaction associated with this object.

Returns:
The transaction status.
Throws:
TransactionException - if the status for this transaction could not be obtained.

getBeginTime

public long getBeginTime()

begin

public void begin(java.lang.String principal,
                  int reason,
                  boolean readOnly)
           throws TransactionException
This method is implemented by this class so that the actual lock can be obtained prior to the transaction beginning.

Throws:
TransactionException

getLockAcquiredBy

public java.lang.String getLockAcquiredBy()
Returns the name that holds the lock.

Returns:
String name who holds the lock

getTransactionID

public TransactionID getTransactionID()
Returns the transaction id that uniquely identifies this transaction

Returns:
TransactionID that identifies the transaction

isReadOnly

public boolean isReadOnly()

getAction

public int getAction()

setAction

public void setAction(int actionPerformed)

setRollbackOnly

public void setRollbackOnly()
                     throws TransactionException
Modify the transaction such that the only possible outcome of the transaction is to roll back the transaction.

Throws:
TransactionException - if the rollback flag is unable to be set for this transaction.

commit

public void commit()
            throws TransactionException
Complete the transaction represented by this TransactionObject.

Throws:
TransactionException - if the transaction is unable to commit.

rollback

public void rollback()
              throws TransactionException
Roll back the transaction represented by this TransactionObject.

Throws:
TransactionException - if the transaction is unable to roll back.

getObjects

public java.util.Collection getObjects()
Returns the objects that changed during this transaction


addObjects

public void addObjects(java.lang.Object key,
                       java.lang.Object value)
Call to add an object to the set of objects that changed during this transaction. For the configuration process, this object will be

Parameters:
key - is the id of the configuration
value - is the configuration container
See Also:
Configuration}

getObject

public java.lang.Object getObject(java.lang.Object key)
Returns the objects that changed during this transaction. For the configuration process, these objects will be

Returns:
Collection of objects that changed during the transaction.
See Also:
Configurations}.

contains

public boolean contains(java.lang.Object key)


Copyright © 2009. All Rights Reserved.