org.objectweb.cjdbc.controller.virtualdatabase.protocol
Class DistributedTransactionMarker

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.virtualdatabase.protocol.DistributedTransactionMarker
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Commit, ReleaseSavepoint, Rollback, RollbackToSavepoint, SetSavepoint

public abstract class DistributedTransactionMarker
extends java.lang.Object
implements java.io.Serializable

This class defines a DistributedTransactionMarker which is used to transport commit/rollback/savepoint type of commands.

Version:
1.0
Author:
Emmanuel Cecchet
See Also:
Serialized Form

Field Summary
protected  long transactionId
           
 
Constructor Summary
DistributedTransactionMarker(long transactionId)
          Creates a new DistributedTransactionMarker object
 
Method Summary
 boolean equals(java.lang.Object obj)
           
abstract  java.lang.Object executeCommand(DistributedRequestManager drm)
          Code to be executed by the distributed request manager receiving the command.
 long getTransactionId()
          Returns the transactionId value.
abstract  void scheduleCommand(DistributedRequestManager drm)
          Schedule the command (i.e. commit or rollback).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transactionId

protected long transactionId
Constructor Detail

DistributedTransactionMarker

public DistributedTransactionMarker(long transactionId)
Creates a new DistributedTransactionMarker object

Parameters:
transactionId - the transaction identifier
Method Detail

scheduleCommand

public abstract void scheduleCommand(DistributedRequestManager drm)
                              throws java.sql.SQLException
Schedule the command (i.e. commit or rollback). This method blocks until the command is scheduled.

Parameters:
drm - a distributed request manager
Throws:
java.sql.SQLException - if an error occurs.

executeCommand

public abstract java.lang.Object executeCommand(DistributedRequestManager drm)
                                         throws java.sql.SQLException
Code to be executed by the distributed request manager receiving the command.

Parameters:
drm - a distributed request manager
Returns:
an Object to be sent back to the caller
Throws:
java.sql.SQLException - if an error occurs.

getTransactionId

public long getTransactionId()
Returns the transactionId value.

Returns:
Returns the transactionId.

equals

public boolean equals(java.lang.Object obj)
See Also:
Object.equals(java.lang.Object)


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.