concurrency
Class Transaction

java.lang.Object
  extended byconcurrency.Transaction

public class Transaction
extends java.lang.Object

This class represents a transaction, encloses a number of transaction.


Nested Class Summary
static class Transaction.Comparator
          A comparator to order transactions.
 
Field Summary
static Transaction.Comparator comparator
          The transactions' comparator.
 
Constructor Summary
Transaction(long number)
          Constructs a transaction with a specified number.
 
Method Summary
 int compare(java.lang.Object obj)
           
 int compare(Transaction t)
          Compares two transactions using their numbers.
 boolean equals(java.lang.Object obj)
           
 boolean equals(Transaction trans)
          Compare if two transactions has the same number.
 long getCreationTime()
          Returns the creation time of the transaction.
 long getTransactionNumber()
          Returns the transaction number.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

comparator

public static Transaction.Comparator comparator
The transactions' comparator.

Constructor Detail

Transaction

public Transaction(long number)
Constructs a transaction with a specified number.

Method Detail

getTransactionNumber

public long getTransactionNumber()
Returns the transaction number.


getCreationTime

public long getCreationTime()
Returns the creation time of the transaction.


equals

public boolean equals(Transaction trans)
Compare if two transactions has the same number.


equals

public boolean equals(java.lang.Object obj)

compare

public int compare(Transaction t)
Compares two transactions using their numbers.


compare

public int compare(java.lang.Object obj)

toString

public java.lang.String toString()