|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Specifies the services which must be provided by the component inside the tuple centre virtual machine collecting and managing tuples as a multiset An important aspect of the component implementing this interface is the ability to execute transactions, that is execute sequence of operations that could be commited or asked to be undone.
Tuple,
TupleTemplate,
TupleCentreVM| Method Summary | |
void |
add(Tuple t)
Adds a tuple to the multiset |
void |
beginTransaction()
Begins a transaction section Every operation on multiset can be undone |
void |
empty()
Empties the multiset |
void |
endTransaction(boolean commit)
Ends a transaction section specifying if operations must be committed or undone |
java.util.Iterator |
getIterator()
Gets an iterator to navigate through tuples of the multiset |
Tuple |
getMatchingTuple(TupleTemplate t)
Gets (and removes) non-deterministically a tuple of the multiset matching the template specified |
boolean |
hasMatchingTuple(TupleTemplate t)
Checks if exists a tuple inside the tuple set matching the template |
boolean |
isEmpty()
Tests if the multiset is empty |
Tuple |
readMatchingTuple(TupleTemplate t)
Gets (wtihout removal) non-deterministically a tuple of the multiset matching the template specified |
int |
size()
Gets the number of tuples inside the multiset |
void |
sub(Tuple t)
Removes a tuple to the multiset |
| Method Detail |
public void add(Tuple t)
t - the tuple to be addedpublic void sub(Tuple t)
t - the tuple to be removedpublic int size()
public boolean isEmpty()
public void empty()
public void beginTransaction()
public void endTransaction(boolean commit)
commit - if true the operations are committed, else
they are undone and the multiset is rolled back to the
state before the beginTransaction invocationpublic Tuple getMatchingTuple(TupleTemplate t)
t - the tuple template to be used for the matchingpublic Tuple readMatchingTuple(TupleTemplate t)
t - the tuple template to be used for the matchingpublic boolean hasMatchingTuple(TupleTemplate t)
t - the tuple template to be used for the matchingtrue if a masching is found, false otherwisepublic java.util.Iterator getIterator()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||