| 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--ostore.update.Update
  All OceanStore updates are represented as an Update
  object.  An Update is an ordered list of
  predicate/action tuples which are represented by
  UpdateTuple objects.  Each tuple contains one
  Predicate and one Action.  The
  Predicate is the root of a boolean expression of
  predicates.  An Action is the first of a list of
  actions.
  
  To apply an update, the update stage examines each
  UpdateTuple in turn.  If the Predicate
  of the tuple evaluates to true, the corresponding
  Action is applied and the Update is
  said to have committed.  After an Update has
  committed, no other tuples are examined.  If all
  Predicates evaluate to false, no
  Action is applied.  The Update is said
  to have aborted.
  
UpdateTuple, 
Predicate, 
Action| Field Summary | |
|---|---|
static boolean | 
DEBUG
 | 
| Constructor Summary | |
|---|---|
Update(InputBuffer buffer)
 | 
|
Update(SecureHash principal,
       SecureHash client)
Create a new Update. | 
|
Update(SecureHash principal,
       SecureHash client,
       UpdateTuple tuple)
Create a new Update containing the specified tuple.  | 
|
Update(SecureHash principal,
       SecureHash client,
       UpdateTuple[] tuples)
Create a new Update containing the specified tuples.  | 
|
| Method Summary | |
|---|---|
 void | 
appendTuple(UpdateTuple tuple)
Add a tuple to the update.  | 
 UpdateResult | 
apply(UpdateRequest request,
      DataCache cache)
Apply the update.  | 
 UpdateResult | 
apply(UpdateRequest update_request,
      UpdateContinuation continuation,
      DataCache cache)
Apply a previously-started update.  | 
 SecureHash | 
getClient()
Return the hash of the client machine from which the update originated.  | 
 SecureHash | 
getFirstTarget()
 | 
 SecureHash | 
getPrincipal()
Return the hash of the principal that created the update.  | 
 Set | 
getTargets()
Returns the set of potential targets of this update.  | 
 QSDate | 
getTimestamp()
Return the timestamp of the update.  | 
 UpdateTuple | 
getTuple(int index)
Return a specified tuple.  | 
 Iterator | 
getTuples()
Return an iterator of the tuples in the update.  | 
 int | 
numTargets()
Return the number of potential targets of the update.  | 
 int | 
numTuples()
Return the number of tuples in the update.  | 
 void | 
prependTuple(UpdateTuple tuple)
Add a tuple to the update.  | 
 void | 
serialize(OutputBuffer buffer)
Add the object to the buffer. | 
 String | 
toString()
Return the string representation of the update.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
public static final boolean DEBUG
| Constructor Detail | 
public Update(SecureHash principal,
              SecureHash client)
Update.
principal - the hash of the principal that created this updateclient - the hash of the client machine from where this update
      originated
public Update(SecureHash principal,
              SecureHash client,
              UpdateTuple tuple)
principal - the hash of the principal that created this Updateclient - the hash of the client machine from where this update
      originatedtuple - a tuple to be included in the update
public Update(SecureHash principal,
              SecureHash client,
              UpdateTuple[] tuples)
principal - the hash of the principal that created this Updateclient - the hash of the client machine from where this update
      originatedtuples - an array of tuples to be included in the update.  The
      ordering of the tuples in the array will be maintained in
      the update
public Update(InputBuffer buffer)
       throws QSException
| Method Detail | 
public void serialize(OutputBuffer buffer)
QuickSerializablebuffer.
serialize in interface QuickSerializablebuffer - the output buffer to add the object topublic SecureHash getPrincipal()
public SecureHash getClient()
public int numTuples()
public void appendTuple(UpdateTuple tuple)
tuple - a tuple to add to the updatepublic void prependTuple(UpdateTuple tuple)
tuple - a tuple to add to the updatepublic Iterator getTuples()
public UpdateTuple getTuple(int index)
index - the index (0-based) of the desired tuple.
UpdateTuple.public int numTargets()
public SecureHash getFirstTarget()
public Set getTargets()
public QSDate getTimestamp()
public String toString()
toString in class Object
public UpdateResult apply(UpdateRequest request,
                          DataCache cache)
                   throws ostore.update.UpdateException
request - the update request currently being servicedcache - TODO
ostore.update.UpdateException - if the update interrupted for any reason
public UpdateResult apply(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
ostore.update.UpdateException - if the update interrupted for any reason
  | 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||