vishnu.model.transactions
Interface Transaction

All Superinterfaces:
java.io.Externalizable, java.io.Serializable
All Known Implementing Classes:
TransactionImpl

public interface Transaction
extends java.io.Externalizable

Interfaz para las transacciones del motor.

Author:
Mariano y Hernan Rancati
 

Method Summary
 void abort()
          Aborta la transaccion.
 void addOperation(Operation o)
           
 void commit()
          Commitea la transaccion
 UserContext getUserContext()
           
 boolean isAborted()
          Indica si la transaccion fue abortada.
 boolean isCommited()
          Indica si la transaccion fue commiteada.
 boolean isFinished()
          tells whether this transactions has nothing more to do.
 boolean isRunning()
          tells whether this transactions is doing something or has things to do.
 java.util.List<Operation> operationsDone()
          returns the sequence of operations that have been already done.
 java.util.Collection<Shareable> resourcesTakenForRead()
          returns the resources that are actually in use by the transaction in read mode.
 java.util.Collection<Shareable> resourcesTakenForWrite()
          returns the resources that are actually in use by the transaction in write mode.
 java.util.Collection<Shareable> resourcesWaitingForRead()
          returns the resources that are actually waited by the transaction in read mode.
 java.util.Collection<Shareable> resourcesWaitingForWrite()
          returns the resources that are actually waited by the transaction in write mode.
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 

Method Detail

abort

void abort()
Aborta la transaccion.


isAborted

boolean isAborted()
Indica si la transaccion fue abortada.

Returns:
true si la transaccion fue abortada, false si no.

commit

void commit()
Commitea la transaccion


isCommited

boolean isCommited()
Indica si la transaccion fue commiteada.

Returns:
true si la transaccion fue commiteada, false si no.

isFinished

boolean isFinished()
tells whether this transactions has nothing more to do.


isRunning

boolean isRunning()
tells whether this transactions is doing something or has things to do.


resourcesTakenForRead

java.util.Collection<Shareable> resourcesTakenForRead()
returns the resources that are actually in use by the transaction in read mode.


resourcesWaitingForRead

java.util.Collection<Shareable> resourcesWaitingForRead()
returns the resources that are actually waited by the transaction in read mode.


resourcesTakenForWrite

java.util.Collection<Shareable> resourcesTakenForWrite()
returns the resources that are actually in use by the transaction in write mode.


resourcesWaitingForWrite

java.util.Collection<Shareable> resourcesWaitingForWrite()
returns the resources that are actually waited by the transaction in write mode.


operationsDone

java.util.List<Operation> operationsDone()
returns the sequence of operations that have been already done.


addOperation

void addOperation(Operation o)

getUserContext

UserContext getUserContext()