Package com.biglybt.core.dht.db.impl
Class DHTDBImpl.adapterFacade
java.lang.Object
com.biglybt.core.dht.db.impl.DHTDBImpl.adapterFacade
- All Implemented Interfaces:
DHTStorageAdapter
- Enclosing class:
- DHTDBImpl
-
Field Summary
Fields -
Constructor Summary
Constructors -
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)
-
Field Details
-
delegate
-
-
Constructor Details
-
adapterFacade
-
-
Method Details
-
getNetwork
public int getNetwork()- Specified by:
getNetwork
in interfaceDHTStorageAdapter
-
keyCreated
Description copied from interface:DHTStorageAdapter
Create a new storage key for a given key- Specified by:
keyCreated
in interfaceDHTStorageAdapter
- Returns:
- null if the key shouldn't be allocated (e.g.out of space)
-
keyDeleted
- Specified by:
keyDeleted
in interfaceDHTStorageAdapter
-
getKeyCount
public int getKeyCount()- Specified by:
getKeyCount
in interfaceDHTStorageAdapter
-
keyRead
- Specified by:
keyRead
in interfaceDHTStorageAdapter
-
deserialiseStats
- Specified by:
deserialiseStats
in interfaceDHTStorageAdapter
- Throws:
IOException
-
valueAdded
- Specified by:
valueAdded
in interfaceDHTStorageAdapter
-
valueUpdated
public void valueUpdated(DHTStorageKey key, DHTTransportValue old_value, DHTTransportValue new_value) - Specified by:
valueUpdated
in interfaceDHTStorageAdapter
-
valueDeleted
- Specified by:
valueDeleted
in interfaceDHTStorageAdapter
-
isDiversified
public boolean isDiversified(byte[] key) - Specified by:
isDiversified
in interfaceDHTStorageAdapter
-
getExistingDiversification
public byte[][] getExistingDiversification(byte[] key, boolean put_operation, boolean exhaustive_get, int max_depth) - Specified by:
getExistingDiversification
in interfaceDHTStorageAdapter
-
createNewDiversification
public byte[][] createNewDiversification(String description, DHTTransportContact cause, byte[] key, boolean put_operation, byte diversification_type, boolean exhaustive_get, int max_depth) - Specified by:
createNewDiversification
in interfaceDHTStorageAdapter
-
getNextValueVersions
public int getNextValueVersions(int num) - Specified by:
getNextValueVersions
in interfaceDHTStorageAdapter
-
keyBlockRequest
public DHTStorageBlock keyBlockRequest(DHTTransportContact direct_sender, byte[] request, byte[] signature) - Specified by:
keyBlockRequest
in interfaceDHTStorageAdapter
-
getKeyBlockDetails
- Specified by:
getKeyBlockDetails
in interfaceDHTStorageAdapter
-
getDirectKeyBlocks
- Specified by:
getDirectKeyBlocks
in interfaceDHTStorageAdapter
-
getKeyForKeyBlock
public byte[] getKeyForKeyBlock(byte[] request) - Specified by:
getKeyForKeyBlock
in interfaceDHTStorageAdapter
-
setStorageForKey
- Specified by:
setStorageForKey
in interfaceDHTStorageAdapter
-
getStorageForKey
- Specified by:
getStorageForKey
in interfaceDHTStorageAdapter
-
getRemoteFreqDivCount
public int getRemoteFreqDivCount()- Specified by:
getRemoteFreqDivCount
in interfaceDHTStorageAdapter
-
getRemoteSizeDivCount
public int getRemoteSizeDivCount()- Specified by:
getRemoteSizeDivCount
in interfaceDHTStorageAdapter
-