|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.post.storage.SignedData
public class SignedData
This class is used internally by the storage package to store data that is signed.
Field Summary | |
---|---|
protected byte[] |
data
|
protected Id |
location
|
static long |
NO_VERSION
|
protected byte[] |
signature
|
protected byte[] |
timestamp
|
Constructor Summary | |
---|---|
SignedData(Id location,
byte[] data,
byte[] timestamp)
Builds a SignedData for a byte array given a timestamp. |
Method Summary | |
---|---|
PastContent |
checkInsert(Id id,
PastContent existingContent)
Checks if a insert operation should be allowed. |
boolean |
equals(java.lang.Object o)
Force subclasses to override equals |
byte[] |
getData()
Returns the internal array of data |
byte[] |
getDataAndTimestamp()
|
GCPastContentHandle |
getHandle(GCPast local,
long expiration)
Produces a handle for this content object. |
PastContentHandle |
getHandle(Past local)
Produces a handle for this content object. |
Id |
getId()
Returns the location of this data |
GCPastMetadata |
getMetadata(long expiration)
Returns the metadata which should be stored with this object. |
byte[] |
getSignature()
|
byte[] |
getTimestamp()
Returns the internal timestamp of this version |
long |
getVersion()
Returns the version number of this object |
boolean |
isMutable()
States if this content object is mutable. |
protected void |
setSignature(byte[] sig)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient byte[] timestamp
protected transient byte[] signature
public static final long NO_VERSION
protected transient byte[] data
protected Id location
Constructor Detail |
---|
public SignedData(Id location, byte[] data, byte[] timestamp)
data
- The data to storetime
- The timestampcredentials
- Credentials of the dataMethod Detail |
---|
public byte[] getTimestamp()
public byte[] getDataAndTimestamp()
public byte[] getSignature()
protected void setSignature(byte[] sig)
public boolean equals(java.lang.Object o)
public java.lang.String toString()
toString
in class java.lang.Object
public PastContent checkInsert(Id id, PastContent existingContent) throws PastException
id
- the key identifying the objectnewObj
- the new object to be storedexistingObj
- the existing object stored on this node (null if no object associated with id is stored on this node)
PastException
public boolean isMutable()
public long getVersion()
getVersion
in interface GCPastContent
public GCPastMetadata getMetadata(long expiration)
getMetadata
in interface GCPastContent
The
- local GCPast service which the content is on.
public Id getId()
getId
in interface PastContent
public byte[] getData()
public PastContentHandle getHandle(Past local)
getHandle
in interface PastContent
The
- local Past service which the content is on.
public GCPastContentHandle getHandle(GCPast local, long expiration)
getHandle
in interface GCPastContent
The
- local Past service which the content is on.
|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |