Package com.biglybt.core.dht
Interface DHTStorageAdapter
- All Known Implementing Classes:
DHTDBImpl.adapterFacade
,DHTPluginStorageManager
public interface DHTStorageAdapter
-
Method Summary
Modifier and TypeMethodDescriptionbyte[][]
createNewDiversification
(String description, DHTTransportContact cause, byte[] key, boolean put_operation, byte diversification_type, boolean exhaustive_get, int max_depth) byte[][]
getExistingDiversification
(byte[] key, boolean put_operation, boolean exhaustive_get, int max_depth) getKeyBlockDetails
(byte[] key) int
byte[]
getKeyForKeyBlock
(byte[] request) int
int
getNextValueVersions
(int num) int
int
byte[]
getStorageForKey
(String key) boolean
isDiversified
(byte[] key) keyBlockRequest
(DHTTransportContact direct_sender, byte[] request, byte[] signature) keyCreated
(HashWrapper key, boolean local) Create a new storage key for a given keyvoid
keyDeleted
(DHTStorageKey adapter_key) void
keyRead
(DHTStorageKey adapter_key, DHTTransportContact contact) void
setStorageForKey
(String key, byte[] data) void
valueAdded
(DHTStorageKey key, DHTTransportValue value) void
valueDeleted
(DHTStorageKey key, DHTTransportValue value) void
valueUpdated
(DHTStorageKey key, DHTTransportValue old_value, DHTTransportValue new_value)
-
Method Details
-
getNetwork
int getNetwork() -
keyCreated
Create a new storage key for a given key- Returns:
- null if the key shouldn't be allocated (e.g.out of space)
-
keyDeleted
-
keyRead
-
deserialiseStats
- Throws:
IOException
-
valueAdded
-
valueUpdated
-
valueDeleted
-
isDiversified
boolean isDiversified(byte[] key) -
getExistingDiversification
byte[][] getExistingDiversification(byte[] key, boolean put_operation, boolean exhaustive_get, int max_depth) -
createNewDiversification
byte[][] createNewDiversification(String description, DHTTransportContact cause, byte[] key, boolean put_operation, byte diversification_type, boolean exhaustive_get, int max_depth) -
getNextValueVersions
int getNextValueVersions(int num) -
keyBlockRequest
DHTStorageBlock keyBlockRequest(DHTTransportContact direct_sender, byte[] request, byte[] signature) -
getKeyBlockDetails
-
getDirectKeyBlocks
DHTStorageBlock[] getDirectKeyBlocks() -
getKeyForKeyBlock
byte[] getKeyForKeyBlock(byte[] request) -
setStorageForKey
-
getStorageForKey
-
getRemoteFreqDivCount
int getRemoteFreqDivCount() -
getRemoteSizeDivCount
int getRemoteSizeDivCount() -
getKeyCount
int getKeyCount()
-