Rice Pastry API

org.mpisws.p2p.transport.peerreview.commitment
Interface AuthenticatorStore<Identifier>

All Known Implementing Classes:
AuthenticatorStoreImpl

public interface AuthenticatorStore<Identifier>

Witnesses use instances of this class to store authenticators. Typically there are three instances: authInStore, authPendingStore and authOutStore. The former two contain authenticators about nodes for which the local node is a witness, while the latter contains authenticators about other nodes which haven't been sent to the corresponding witness sets yet.


Method Summary
 void addAuthenticator(Identifier id, Authenticator authenticator)
          Also writes it to disk.
 void disableMemoryBuffer()
           
 void flush(Identifier id)
           
 void flushAll()
           
 void flushAuthenticatorsFor(Identifier id)
           
 void flushAuthenticatorsFor(Identifier id, long minseq, long maxseq)
           
 void garbageCollect()
          Commits the Authenticators in memory to disk, overwriting the old store.
 java.util.List<Authenticator> getAuthenticators(Identifier id)
           
 java.util.List<Authenticator> getAuthenticators(Identifier id, long minseq, long maxseq)
          Retrieve all the authenticators within a given range of sequence numbers
 int getAuthenticatorSizeBytes()
           
 Authenticator getLastAuthenticatorBefore(Identifier id, long seq)
           
 Authenticator getMostRecentAuthenticator(Identifier id)
           
 int getNumSubjects()
           
 Authenticator getOldestAuthenticator(Identifier id)
           
 java.util.List<Identifier> getSubjects()
           
 int numAuthenticatorsFor(Identifier id)
           
 int numAuthenticatorsFor(Identifier id, long minseq, long maxseq)
           
 void setFilename(java.io.File file)
           
 Authenticator statAuthenticator(Identifier id, long seq)
           
 

Method Detail

setFilename

void setFilename(java.io.File file)
                 throws java.io.IOException
Throws:
java.io.IOException

getMostRecentAuthenticator

Authenticator getMostRecentAuthenticator(Identifier id)

getOldestAuthenticator

Authenticator getOldestAuthenticator(Identifier id)

getLastAuthenticatorBefore

Authenticator getLastAuthenticatorBefore(Identifier id,
                                         long seq)

disableMemoryBuffer

void disableMemoryBuffer()

addAuthenticator

void addAuthenticator(Identifier id,
                      Authenticator authenticator)
Also writes it to disk.

Parameters:
id -
authenticator -
Throws:
java.io.IOException

garbageCollect

void garbageCollect()
                    throws java.io.IOException
Commits the Authenticators in memory to disk, overwriting the old store. Since the authenticator file on disk is append-only, we need to garbage collect it from time to time. When this becomes necessary, we clear the file and then write out the authenticators currently in memory.

Throws:
java.io.IOException

numAuthenticatorsFor

int numAuthenticatorsFor(Identifier id)

numAuthenticatorsFor

int numAuthenticatorsFor(Identifier id,
                         long minseq,
                         long maxseq)

flushAuthenticatorsFor

void flushAuthenticatorsFor(Identifier id,
                            long minseq,
                            long maxseq)

flushAuthenticatorsFor

void flushAuthenticatorsFor(Identifier id)

statAuthenticator

Authenticator statAuthenticator(Identifier id,
                                long seq)

getAuthenticators

java.util.List<Authenticator> getAuthenticators(Identifier id,
                                                long minseq,
                                                long maxseq)
Retrieve all the authenticators within a given range of sequence numbers


getAuthenticators

java.util.List<Authenticator> getAuthenticators(Identifier id)

getSubjects

java.util.List<Identifier> getSubjects()

getNumSubjects

int getNumSubjects()

getAuthenticatorSizeBytes

int getAuthenticatorSizeBytes()

flush

void flush(Identifier id)

flushAll

void flushAll()

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection