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

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.virtualdatabase.protocol.DistributedTransactionMarker
      extended byorg.objectweb.cjdbc.controller.virtualdatabase.protocol.Commit
All Implemented Interfaces:
java.io.Serializable

public class Commit
extends DistributedTransactionMarker

Execute a distributed commit.

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

Field Summary
private  java.lang.String login
           
private  int numberOfEnabledBackends
           
private static long serialVersionUID
           
private  java.lang.Long tid
           
private  TransactionMarkerMetaData tm
           
private  boolean transactionStartedOnThisController
           
 
Fields inherited from class org.objectweb.cjdbc.controller.virtualdatabase.protocol.DistributedTransactionMarker
transactionId
 
Constructor Summary
Commit(java.lang.String login, long transactionId)
          Creates a new Commit message.
 
Method Summary
 java.lang.Object executeCommand(DistributedRequestManager drm)
          Execution of a distributed commit command on the specified DistributedRequestManager
 void scheduleCommand(DistributedRequestManager drm)
          Schedule the command (i.e. commit or rollback).
 java.lang.String toString()
           
 
Methods inherited from class org.objectweb.cjdbc.controller.virtualdatabase.protocol.DistributedTransactionMarker
equals, getTransactionId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

tm

private transient TransactionMarkerMetaData tm

tid

private transient java.lang.Long tid

numberOfEnabledBackends

private transient int numberOfEnabledBackends

transactionStartedOnThisController

private transient boolean transactionStartedOnThisController

login

private java.lang.String login
Constructor Detail

Commit

public Commit(java.lang.String login,
              long transactionId)
Creates a new Commit message.

Parameters:
login - login that commit the transaction
transactionId - id of the transaction to commit
Method Detail

scheduleCommand

public void scheduleCommand(DistributedRequestManager drm)
                     throws java.sql.SQLException
Description copied from class: DistributedTransactionMarker
Schedule the command (i.e. commit or rollback). This method blocks until the command is scheduled.

Specified by:
scheduleCommand in class DistributedTransactionMarker
Parameters:
drm - a distributed request manager
Throws:
java.sql.SQLException - if an error occurs.
See Also:
DistributedTransactionMarker.scheduleCommand(org.objectweb.cjdbc.controller.requestmanager.distributed.DistributedRequestManager)

executeCommand

public java.lang.Object executeCommand(DistributedRequestManager drm)
                                throws java.sql.SQLException
Execution of a distributed commit command on the specified DistributedRequestManager

Specified by:
executeCommand in class DistributedTransactionMarker
Parameters:
drm - the DistributedRequestManager that will execute the commit
Returns:
Boolean.TRUE if everything went fine or a SQLException if an error occured
Throws:
java.sql.SQLException - if an error occurs

toString

public java.lang.String toString()
See Also:
Object.toString()


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