public class PubkeyStore extends StoreCallback<DSAPublicKey>
store
Constructor and Description |
---|
PubkeyStore() |
Modifier and Type | Method and Description |
---|---|
boolean |
collisionPossible()
Can the same key be valid for two different StorableBlocks?
|
DSAPublicKey |
construct(byte[] data,
byte[] headers,
byte[] routingKey,
byte[] fullKey,
boolean canReadClientCache,
boolean canReadSlashdotCache,
BlockMetadata meta,
DSAPublicKey ignored)
Construct a StorableBlock from the data, headers, and optionally routing key or full key.
|
boolean |
constructNeedsKey()
Whether we need the key in order to reconstruct a block.
|
int |
dataLength()
Length of a data block.
|
DSAPublicKey |
fetch(byte[] hash,
boolean dontPromote,
boolean ignoreOldBlocks,
BlockMetadata meta) |
int |
fullKeyLength()
Length of a full key.
|
int |
headerLength()
Length of a header block.
|
void |
put(byte[] hash,
DSAPublicKey key,
boolean isOldBlock) |
byte[] |
routingKeyFromFullKey(byte[] keyBuf)
Generate a routing key from a full key
|
int |
routingKeyLength()
Length of a routing key.
|
boolean |
storeFullKeys()
Whether we should create a .keys file to keep full keys in in order to reconstruct.
|
getBloomFalsePositive, getMaxKeys, getSessionAccessStats, getStore, getTotalAccessStats, getTotalBlockSize, hits, keyCount, misses, setMaxKeys, setStore, writes
public boolean collisionPossible()
StoreCallback
collisionPossible
in class StoreCallback<DSAPublicKey>
public DSAPublicKey construct(byte[] data, byte[] headers, byte[] routingKey, byte[] fullKey, boolean canReadClientCache, boolean canReadSlashdotCache, BlockMetadata meta, DSAPublicKey ignored) throws KeyVerifyException
StoreCallback
construct
in class StoreCallback<DSAPublicKey>
KeyVerifyException
public DSAPublicKey fetch(byte[] hash, boolean dontPromote, boolean ignoreOldBlocks, BlockMetadata meta) throws java.io.IOException
java.io.IOException
public void put(byte[] hash, DSAPublicKey key, boolean isOldBlock) throws java.io.IOException
java.io.IOException
public int dataLength()
StoreCallback
dataLength
in class StoreCallback<DSAPublicKey>
public int fullKeyLength()
StoreCallback
fullKeyLength
in class StoreCallback<DSAPublicKey>
public int headerLength()
StoreCallback
headerLength
in class StoreCallback<DSAPublicKey>
public int routingKeyLength()
StoreCallback
routingKeyLength
in class StoreCallback<DSAPublicKey>
public boolean storeFullKeys()
StoreCallback
storeFullKeys
in class StoreCallback<DSAPublicKey>
public boolean constructNeedsKey()
StoreCallback
constructNeedsKey
in class StoreCallback<DSAPublicKey>
public byte[] routingKeyFromFullKey(byte[] keyBuf)
StoreCallback
routingKeyFromFullKey
in class StoreCallback<DSAPublicKey>