org.multiverse.transactional.nonblocking
Interface NonBlockingTask


public interface NonBlockingTask

A non blocking task can be compared to a Runnable except:

  1. it works with a transaction
  2. it can be retried. Retrying
Should this be the same as context? So is there a need for context?

Author:
Peter Veentjer.

Method Summary
 boolean execute(Transaction t)
          Executes this non blocking task.
 TransactionFactory getTransactionFactory()
          The TransactionFactory used to create transactions for executing this task.
 

Method Detail

getTransactionFactory

TransactionFactory getTransactionFactory()
The TransactionFactory used to create transactions for executing this task.

Returns:
the TransactionFactory used for creating transactions.

execute

boolean execute(Transaction t)
Executes this non blocking task.

Parameters:
t - the Transaction used to execute the task.
Returns:
true if the task should be executed again, false otherwise.
Throws:
RetryError


Copyright © 2008-2010 Multiverse. All Rights Reserved.