Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mpisws.p2p.transport.peerreview.history
Class SecureHistoryFactoryImpl

    java.lang.Object
      org.mpisws.p2p.transport.peerreview.history.SecureHistoryFactoryImpl

All Implemented Interfaces:
  IndexEntryFactory, SecureHistoryFactory, PeerReviewEvents

    public class SecureHistoryFactoryImpl

extends java.lang.Object
implements SecureHistoryFactory, IndexEntryFactory, PeerReviewEvents

Field Summary

Fields inherited from interface org.mpisws.p2p.transport.peerreview.PeerReviewEvents
`EVT_ACK, EVT_CHECKPOINT, EVT_INIT, EVT_MAX_SOCKET_EVT, EVT_MIN_SOCKET_EVT, EVT_RECV, EVT_SEND, EVT_SENDSIGN, EVT_SIGN, EVT_SOCKET_CAN_READ, EVT_SOCKET_CAN_RW, EVT_SOCKET_CAN_WRITE, EVT_SOCKET_CLOSE, EVT_SOCKET_CLOSED, EVT_SOCKET_EXCEPTION, EVT_SOCKET_OPEN_INCOMING, EVT_SOCKET_OPEN_OUTGOING, EVT_SOCKET_OPENED_OUTGOING, EVT_SOCKET_READ, EVT_SOCKET_SHUTDOWN_OUTPUT, EVT_SOCKET_WRITE, EX_TYPE_ClosedChannel, EX_TYPE_IO, EX_TYPE_Unknown`

Constructor Summary
`SecureHistoryFactoryImpl(HashProvider hashProv, Environment env)`

Method Summary
`IndexEntry` | `build(InputBuffer buf)`
`SecureHistory` | `create(java.lang.String name, long baseSeq, Hash baseHash)` Creates a new history (aka log).
`int` | `getSerializedSize()`
`SecureHistory` | `open(java.lang.String name, java.lang.String mode)` Opens an existing history (aka log).

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SecureHistoryFactoryImpl

    public SecureHistoryFactoryImpl(HashProvider hashProv,
                                    Environment env)

Method Detail

### create

    public SecureHistory create(java.lang.String name,
                                long baseSeq,
                                Hash baseHash)
                         throws java.io.IOException

  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`

### open

    public SecureHistory open(java.lang.String name,
                              java.lang.String mode)
                       throws java.io.IOException

  Opens an existing history (aka log). The 'mode' can either be 'r' (read-only) or 'w' (read/write).

  Specified by:
    `open` in interface `SecureHistoryFactory`
  Throws:
    `java.io.IOException`

### build

    public IndexEntry build(InputBuffer buf)
                     throws java.io.IOException

  Specified by:
    `build` in interface `IndexEntryFactory`
  Throws:
    `java.io.IOException`

### getSerializedSize

    public int getSerializedSize()

  Specified by:
    `getSerializedSize` in interface `IndexEntryFactory`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.