public class SSKStore extends StoreCallback<SSKBlock>
store| Modifier and Type | Method and Description |
|---|---|
boolean |
collisionPossible()
Can the same key be valid for two different StorableBlocks?
|
SSKBlock |
construct(byte[] data,
byte[] headers,
byte[] routingKey,
byte[] fullKey,
boolean canReadClientCache,
boolean canReadSlashdotCache,
BlockMetadata meta,
DSAPublicKey knownPublicKey)
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.
|
SSKBlock |
fetch(NodeSSK chk,
boolean dontPromote,
boolean canReadClientCache,
boolean canReadSlashdotCache,
boolean ignoreOldBlocks,
BlockMetadata meta) |
int |
fullKeyLength()
Length of a full key.
|
int |
headerLength()
Length of a header block.
|
void |
put(SSKBlock b,
boolean overwrite,
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 SSKStore(GetPubkey pubkeyCache)
public SSKBlock construct(byte[] data, byte[] headers, byte[] routingKey, byte[] fullKey, boolean canReadClientCache, boolean canReadSlashdotCache, BlockMetadata meta, DSAPublicKey knownPublicKey) throws SSKVerifyException
StoreCallbackconstruct in class StoreCallback<SSKBlock>SSKVerifyExceptionpublic SSKBlock fetch(NodeSSK chk, boolean dontPromote, boolean canReadClientCache, boolean canReadSlashdotCache, boolean ignoreOldBlocks, BlockMetadata meta) throws java.io.IOException
java.io.IOExceptionpublic void put(SSKBlock b, boolean overwrite, boolean isOldBlock) throws java.io.IOException, KeyCollisionException
java.io.IOExceptionKeyCollisionExceptionpublic int dataLength()
StoreCallbackdataLength in class StoreCallback<SSKBlock>public int fullKeyLength()
StoreCallbackfullKeyLength in class StoreCallback<SSKBlock>public int headerLength()
StoreCallbackheaderLength in class StoreCallback<SSKBlock>public int routingKeyLength()
StoreCallbackroutingKeyLength in class StoreCallback<SSKBlock>public boolean storeFullKeys()
StoreCallbackstoreFullKeys in class StoreCallback<SSKBlock>public boolean collisionPossible()
StoreCallbackcollisionPossible in class StoreCallback<SSKBlock>public boolean constructNeedsKey()
StoreCallbackconstructNeedsKey in class StoreCallback<SSKBlock>public byte[] routingKeyFromFullKey(byte[] keyBuf)
StoreCallbackroutingKeyFromFullKey in class StoreCallback<SSKBlock>