Package net.sf.tuplespace.utils

Various utilities facilitating work with TupleSpace.

See:
          Description

Interface Summary
UnitOfWork Represents a single unit of work.
 

Class Summary
UnitOfWorkRunner A class that repeateadly executes a unit of work, always using the same TupleSpace.
 

Package net.sf.tuplespace.utils Description

Various utilities facilitating work with TupleSpace.

UnitOfWork

Use the UnitOfWorkRunner when you want to implement the following idiom:

while (true) {
    Tuple tuple = tupleSpace.readAndRemove(template);
    // work with tuple
    tupleSpace.addToSpace(resultTuple);
}

The UnitOfWorkRunner is a Template which uses the Strategy pattern to implement workers. The workers should implement UnitOfWork.