Rice Pastry API

org.mpisws.p2p.transport.peerreview
Class SecureHistoryFactoryImpl

java.lang.Object
  extended by org.mpisws.p2p.transport.peerreview.SecureHistoryFactoryImpl
All Implemented Interfaces:
SecureHistoryFactory

public class SecureHistoryFactoryImpl
extends java.lang.Object
implements SecureHistoryFactory


Field Summary
static int HASH_LENGTH
           
 
Constructor Summary
SecureHistoryFactoryImpl()
           
 
Method Summary
 SecureHistory create(java.lang.String name, long baseSeq, Hash baseHash)
          Creates a new history (aka log).
 int getHashSizeBytes()
           
 SecureHistory open(java.lang.String name, boolean readonly)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HASH_LENGTH

public static final int HASH_LENGTH
See Also:
Constant Field Values
Constructor Detail

SecureHistoryFactoryImpl

public SecureHistoryFactoryImpl()
Method Detail

create

public SecureHistory create(java.lang.String name,
                            long baseSeq,
                            Hash baseHash)
                     throws java.io.IOException
Description copied from interface: SecureHistoryFactory
Creates a new history (aka log). Histories are stored as two files: The 'index' file has a fixed-size record for each entry, which contains the sequence number, content and node hashes, as well as an index into the data file. The 'data' file just contains the raw bytes for each entry. Note that the caller must specify the node hash and the sequence number of the first log entry, which forms the base of the hash chain.

Specified by:
create in interface SecureHistoryFactory
Throws:
java.io.IOException

getHashSizeBytes

public int getHashSizeBytes()
Specified by:
getHashSizeBytes in interface SecureHistoryFactory

open

public SecureHistory open(java.lang.String name,
                          boolean readonly)
                   throws java.io.IOException
Specified by:
open in interface SecureHistoryFactory
Throws:
java.io.IOException

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection