|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.client.OSRequest | +--ostore.client.OSUpdate
An application uses the OSUpdate
to modify a data
object in OceanStore. In response to this request, the
application will receive an OSUpdateResult
. To
create an update, the system requires the principal's public key,
the principal's private key, and one or more
OSUpdateTuple
s that describe the update.
The principal's public key is used to identify the creator of the update. The principal's private key is used to sign the update. The signed update asserts that the signing principal requests the included update.
The principal's private key is used only by the
ClientStage
to sign the update. It is not
transmitted further to the system and is discarded after the
result of the request is known.
To enable the ClientStage
to manage the encryption
of users' data, the OSUpdate
contains a boolean flag
to be set by the application to indicate whether the update
should be encrypted.
OceanStore applications request modifications to data objects by
submitting an OSUpdate
. An OSUpdate
is
an ordered list of update tuples which are represented by
OSUpdateTuple
objects. Each tuple contains one
OSPredicate
and one OSAction
. The
OSPredicate
is the root of a boolean expression of
predicates. An OSAction
is the first of a list of
actions.
An OSUpdate
is evaluated by examining each tuple in
turn. If the predicate of a tuple evaluates to
true
, the action in the tuple is applied and the
update is said to have committed. After an update has committed,
no other tuples are examined. If the predicates of all tuples
evaluate to false
, no action is applied, and the
update is said to have aborted.
OSUpdateTuple
,
OSPredicate
,
OSAction
,
OSUpdateResult
Field Summary |
---|
Fields inherited from class ostore.client.OSRequest |
---|
app_id |
Constructor Summary | |
---|---|
OSUpdate(InputBuffer buffer)
|
|
OSUpdate(OSAppId app_id,
SecureHash principal,
QSPrivateKey principal_skey)
Creates a new OSUpdate . |
|
OSUpdate(OSAppId app_id,
SecureHash principal,
QSPrivateKey principal_skey,
OSUpdateTuple tuple)
Creates a new OSUpdate and inserts one tuple
into the update. |
|
OSUpdate(OSAppId app_id,
SecureHash principal,
QSPrivateKey principal_skey,
OSUpdateTuple tuple,
boolean return_type)
|
Method Summary | |
---|---|
void |
appendTuple(OSUpdateTuple tuple)
Appends a tuple to the end of the ordered tuple list for this update. |
boolean |
getEncrypt()
Returns the value of the encryption flag. |
Iterator |
getTuples()
Returns an Iterator of the tuples in this update. |
void |
serialize(OutputBuffer buffer)
Add the object to the buffer . |
void |
setEncrypt(boolean encrypt)
Sets the value of the encryption flag. |
String |
toString()
|
Methods inherited from class ostore.client.OSRequest |
---|
clone, getAppId, getDispatchTime, getSeqNum, getUserTag, setUserTag |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public OSUpdate(OSAppId app_id, SecureHash principal, QSPrivateKey principal_skey)
OSUpdate
. Tuples can be added to
the update using the appendTuple() method.
app_id
- the OSAppId
to identify the requesting
applicationprincipal
- the secure hash of the principal's public keyprincipal_skey
- the principal's private keypublic OSUpdate(OSAppId app_id, SecureHash principal, QSPrivateKey principal_skey, OSUpdateTuple tuple)
OSUpdate
and inserts one tuple
into the update.
app_id
- the OSAppId
to identify the requesting
applicationprincipal
- the secure hash of the principal's public keyprincipal_skey
- the principal's private keytuple
- the tuple to add to the updatepublic OSUpdate(OSAppId app_id, SecureHash principal, QSPrivateKey principal_skey, OSUpdateTuple tuple, boolean return_type)
public OSUpdate(InputBuffer buffer) throws QSException
Method Detail |
public void serialize(OutputBuffer buffer)
QuickSerializable
buffer
.
serialize
in interface QuickSerializable
serialize
in class OSRequest
buffer
- the output buffer to add the object topublic void setEncrypt(boolean encrypt)
true
, the ClientStage
will encrypt
the data in the update before submitting it to the system.
encrypt
- the value of the encryption flagpublic boolean getEncrypt()
public void appendTuple(OSUpdateTuple tuple)
tuple
- the tuple to append to the tuple listpublic Iterator getTuples()
Iterator
of the tuples in this update.
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |