org.xvsm.internal.tasks.dao.inmemory
Class TransactionDAO

Package class diagram package TransactionDAO
java.lang.Object
  extended by org.xvsm.internal.tasks.dao.inmemory.TransactionDAO
All Implemented Interfaces:
java.util.concurrent.locks.ReadWriteLock, ITransactionDAO

public class TransactionDAO
extends java.lang.Object
implements ITransactionDAO

Author:
Christian Schreiber, Michael Proestler

Constructor Summary
TransactionDAO()
           
 
Method Summary
 boolean add(OperationTask task, Transaction source)
          Adds a OperationTask.
 void commit(Transaction tx)
          Informs that the transaction has commited.
 java.util.List<OperationTask> getAll()
          Returns a List with all Tasks.
 java.util.concurrent.locks.Lock readLock()
          .
 void remove(OperationTask t)
          Removes the task.
 java.util.List<OperationTask> take()
          Takes all OperationTasks.
 java.util.concurrent.locks.Lock writeLock()
          .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionDAO

public TransactionDAO()
Method Detail

add

public boolean add(OperationTask task,
                   Transaction source)
Adds a OperationTask..

Specified by:
add in interface ITransactionDAO
Parameters:
task - the new task.
source - the transaction that is the reason for this exception.
Returns:
true, if the task has been stored, false if at the according transaction has already commit during that time.

take

public java.util.List<OperationTask> take()
Takes all OperationTasks..

Specified by:
take in interface ITransactionDAO
Returns:
all tasks.

getAll

public java.util.List<OperationTask> getAll()
Returns a List with all Tasks..

Specified by:
getAll in interface ITransactionDAO
Returns:
all tasks.

readLock

public java.util.concurrent.locks.Lock readLock()
.

Specified by:
readLock in interface java.util.concurrent.locks.ReadWriteLock

writeLock

public java.util.concurrent.locks.Lock writeLock()
.

Specified by:
writeLock in interface java.util.concurrent.locks.ReadWriteLock

commit

public void commit(Transaction tx)
Informs that the transaction has commited.

Specified by:
commit in interface ITransactionDAO
Parameters:
tx - the transaction that has committed.

remove

public void remove(OperationTask t)
Removes the task.

Specified by:
remove in interface ITransactionDAO
Parameters:
t - the Task to remove.


Copyright © 2009. All Rights Reserved.