|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SecureHistory
| Field Summary |
|---|
| Fields inherited from interface org.mpisws.p2p.transport.peerreview.StatusConstants |
|---|
STATUS_EXPOSED, STATUS_SUSPECTED, STATUS_TRUSTED |
| Method Summary | |
|---|---|
void |
appendEntry(short type,
boolean storeFullEntry,
ByteBuffer... entry)
Appends a new entry to the log. |
void |
appendHash(short type,
byte[] hash)
Append a new hashed entry to the log. |
void |
appendSnippetToHistory(LogSnippet snippet)
|
void |
close()
The destructor. |
long |
findLastEntry(short[] types,
long maxSeq)
Find the most recent entry whose type is in the specified set. |
long |
findSeq(long seq)
|
long |
findSeqOrHigher(long seq,
boolean allowHigher)
Look up a given sequence number, or the first sequence number that is not lower than a given number. |
long |
getBaseSeq()
|
byte[] |
getEntry(IndexEntry ie,
int maxSizeToRead)
|
byte[] |
getEntry(long idx,
int maxSizeToRead)
Get the content of a log entry, specified by its record number |
long |
getLastSeq()
|
long |
getNumEntries()
|
HashSeq |
getTopLevelEntry()
Returns the node hash and the sequence number of the most recent log entry |
LogSnippet |
serializeRange(long idxFrom,
long idxTo,
HashPolicy hashPolicy)
Serialize a given range of entries, and write the result to the specified file. |
boolean |
setNextSeq(long nextSeq)
Sets the next sequence number to be used. |
IndexEntry |
statEntry(long idx)
Retrieve information about a given record |
boolean |
upgradeHashedEntry(int idx,
ByteBuffer entry)
If the log already contains an entry in 'hashed' form and we learn the actual contents later, this function is called. |
| Method Detail |
|---|
long getNumEntries()
long getBaseSeq()
long getLastSeq()
HashSeq getTopLevelEntry()
void appendEntry(short type,
boolean storeFullEntry,
ByteBuffer... entry)
throws IOException
IOException
void appendHash(short type,
byte[] hash)
throws IOException
IOExceptionboolean setNextSeq(long nextSeq)
void close()
throws IOException
IOException
long findSeq(long seq)
throws IOException
IOException
long findSeqOrHigher(long seq,
boolean allowHigher)
throws IOException
IOException
LogSnippet serializeRange(long idxFrom,
long idxTo,
HashPolicy hashPolicy)
throws IOException
IOException
IndexEntry statEntry(long idx)
throws IOException
idx - the index you are interested in
IOException
byte[] getEntry(long idx,
int maxSizeToRead)
throws IOException
IOException
byte[] getEntry(IndexEntry ie,
int maxSizeToRead)
throws IOException
IOException
boolean upgradeHashedEntry(int idx,
ByteBuffer entry)
throws IOException
IOException
long findLastEntry(short[] types,
long maxSeq)
throws IOException
IOException
void appendSnippetToHistory(LogSnippet snippet)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||