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, writespublic boolean collisionPossible()
StoreCallbackcollisionPossible 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
StoreCallbackconstruct in class StoreCallback<DSAPublicKey>KeyVerifyExceptionpublic DSAPublicKey fetch(byte[] hash, boolean dontPromote, boolean ignoreOldBlocks, BlockMetadata meta) throws java.io.IOException
java.io.IOExceptionpublic void put(byte[] hash,
DSAPublicKey key,
boolean isOldBlock)
throws java.io.IOException
java.io.IOExceptionpublic int dataLength()
StoreCallbackdataLength in class StoreCallback<DSAPublicKey>public int fullKeyLength()
StoreCallbackfullKeyLength in class StoreCallback<DSAPublicKey>public int headerLength()
StoreCallbackheaderLength in class StoreCallback<DSAPublicKey>public int routingKeyLength()
StoreCallbackroutingKeyLength in class StoreCallback<DSAPublicKey>public boolean storeFullKeys()
StoreCallbackstoreFullKeys in class StoreCallback<DSAPublicKey>public boolean constructNeedsKey()
StoreCallbackconstructNeedsKey in class StoreCallback<DSAPublicKey>public byte[] routingKeyFromFullKey(byte[] keyBuf)
StoreCallbackroutingKeyFromFullKey in class StoreCallback<DSAPublicKey>