|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.post.log.Log rice.post.log.EncryptedLog rice.post.log.CoalescedLog
public class CoalescedLog
Class which represents an encrypted and coalesced log in the POST system. This class is designed so that applications can simply use this as the log head, instead of the Log class, and the contents of the log will automatically be encrypted and coalesced into the provided number of discrete fragments.
Nested Class Summary | |
---|---|
protected class |
CoalescedLog.AddCoalescedLogEntryTask
This class encapsulates the logic needed to add a log entry to the current coalesced log. |
protected class |
CoalescedLog.PhantomLogEntry
Internal class for bookkeeping log entries |
Nested classes/interfaces inherited from class rice.post.log.Log |
---|
Log.AddLogEntryTask |
Field Summary | |
---|---|
protected java.util.Vector |
cbuffer
|
protected byte[] |
cipherPending
|
static int |
COALESCE_NUM
|
protected Logger |
logger
|
protected rice.post.log.CoalescedLogEntry |
pending
|
Fields inherited from class rice.post.log.EncryptedLog |
---|
cipherKey, key |
Fields inherited from class rice.post.log.Log |
---|
buffer, children, childrenCache, location, N_TOP_ENTRIES, name, post, topEntry, topEntryReference, topEntryReferences |
Constructor Summary | |
---|---|
CoalescedLog(java.lang.Object name,
Id location,
Post post,
java.security.KeyPair keyPair)
Constructs a Log for use in POST, with the provided number of coalesced log entries. |
|
CoalescedLog(java.lang.Object name,
Id location,
Post post,
java.security.KeyPair keyPair,
byte[] cipherKey)
Constructs a Log for use in POST, with the provided number of coalesced log entries. |
Method Summary | |
---|---|
void |
addLogEntry(LogEntry entry,
Continuation command)
This method appends an entry into the user's log, and updates the pointer to the top of the log to reflect the new object. |
void |
getActualTopEntry(Continuation command)
This method returns the *actual* top entry in the log. |
void |
getLogEntryReferences(java.util.Set set,
LogEntry entry,
Continuation command)
This method returns a list of all the handles stored in the folder or any subfolders. |
void |
getTopEntry(Continuation command)
This method returns a reference to the most recent entry in the log, which can then be used to walk down the log. |
protected void |
regenerateCipherPending()
Method which regenerates the ciphertext of the number of log entries |
protected void |
resetPending()
Method which resets the nuber of entries to be zero. |
protected void |
retrievePending()
Method which deserializes the encrypted yet-to-be-coalesed log entries once the key has been retrieved. |
void |
setKeyPair(java.security.KeyPair keyPair)
Method which deserializes the list of yet-to-be-coalesed entries when the coalesced log is read off of the wire. |
java.lang.String |
toString()
|
Methods inherited from class rice.post.log.Log |
---|
addChildLog, buildContentHashReference, buildSecureReference, buildSignedReference, cache, getChildLog, getChildLogNames, getLocation, getName, getRealTopEntry, getTopEntryReference, removeChildLog, setName, setPost, sync |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int COALESCE_NUM
protected transient byte[] cipherPending
protected transient rice.post.log.CoalescedLogEntry pending
protected transient java.util.Vector cbuffer
protected transient Logger logger
Constructor Detail |
---|
public CoalescedLog(java.lang.Object name, Id location, Post post, java.security.KeyPair keyPair)
name
- Some unique identifier for this loglocation
- The location of this log in PASTpublic CoalescedLog(java.lang.Object name, Id location, Post post, java.security.KeyPair keyPair, byte[] cipherKey)
name
- Some unique identifier for this loglocation
- The location of this log in PASTMethod Detail |
---|
public void addLogEntry(LogEntry entry, Continuation command)
addLogEntry
in class EncryptedLog
entry
- The log entry to append to the log.command
- The command to run once donepublic void getLogEntryReferences(java.util.Set set, LogEntry entry, Continuation command)
getLogEntryReferences
in class Log
public void getTopEntry(Continuation command)
getTopEntry
in class EncryptedLog
public void getActualTopEntry(Continuation command)
protected void resetPending()
protected void regenerateCipherPending()
protected void retrievePending()
public void setKeyPair(java.security.KeyPair keyPair)
setKeyPair
in class EncryptedLog
keyPair
- The keypair for this logpublic java.lang.String toString()
toString
in class EncryptedLog
|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |