|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.update.UpdateTuple
The UpdateTuple
, or tuple for short, is a container
for a Predicate
and an Action
. If the
Predicate
of the tuple evaluates to
true
, all of the Action
s in the tuple
will be executed. Tuples are stored in an ordered list in an
Update
.
Constructor Summary | |
---|---|
UpdateTuple()
|
|
UpdateTuple(InputBuffer buffer)
|
|
UpdateTuple(Predicate predicate,
Action action)
Create an UpdateTuple with the specified
Predicate and Action . |
Method Summary | |
---|---|
void |
appendAction(Action action)
Adds an action to the end of the list of actions for this tuple. |
boolean |
evaluate(UpdateRequest update_request,
UpdateContinuation continuation,
DataCache cache)
Evaluate the predicate of this tuple. |
UpdateResult |
execute(UpdateRequest update_request,
UpdateContinuation continuation,
DataCache cache)
Perform the actions in this tuple. |
Action |
getActionAt(int index)
Returns the action at the given index in this tuple. |
Vector |
getActions()
Returns the actions in this tuple. |
Predicate |
getPredicate()
Return the predicate of this tuple. |
Set |
getTargets()
Returns a set containing all of the potential targets of this tuple. |
void |
insertAction(Action action,
int index)
Adds an action to this tuple at the specified location in the list of tuples. |
void |
prependAction(Action action)
Adds an action to the beginning of the list of actions for this tuple. |
void |
serialize(OutputBuffer buffer)
Add the object to the buffer . |
void |
setPredicate(Predicate predicate)
Sets the predicate of this tuple. |
String |
toString()
Return the String representation of the tuple. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public UpdateTuple()
public UpdateTuple(Predicate predicate, Action action)
UpdateTuple
with the specified
Predicate
and Action
.
predicate
- the predicate of the tupleaction
- the action of the tuplepublic UpdateTuple(InputBuffer buffer) throws QSException
Method Detail |
public void serialize(OutputBuffer buffer)
QuickSerializable
buffer
.
serialize
in interface QuickSerializable
buffer
- the output buffer to add the object topublic void setPredicate(Predicate predicate)
predicate
- the predicate of this tuplepublic Predicate getPredicate()
public void appendAction(Action action)
action
- the action to add to this tuplepublic void prependAction(Action action)
action
- the action to add to this tuplepublic void insertAction(Action action, int index)
action
- the action to add to this tupleindex
- the index at which to insert the actionpublic Vector getActions()
public Action getActionAt(int index)
index
- the index of the action to return
null
if
such action existspublic Set getTargets()
public boolean evaluate(UpdateRequest update_request, UpdateContinuation continuation, DataCache cache) throws ostore.update.UpdateException
update_request
- the update request currently being servicedcontinuation
- the state of update so that it may be restarted
true
iff the predicate evaluates to true;
false
otherwise
ostore.update.UpdateException
- if the evaluation of the predicate is interruptedpublic UpdateResult execute(UpdateRequest update_request, UpdateContinuation continuation, DataCache cache) throws ostore.update.UpdateException
update_request
- the update request currently being servicedcontinuation
- an object representing the state of an update needed for
restartability
ostore.update.UpdateException
- if the execution of the actions is interruptedpublic String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |