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) intbyte[]getKeyForKeyBlock(byte[] request) intintgetNextValueVersions(int num) intintbyte[]getStorageForKey(String key) booleanisDiversified(byte[] key) keyBlockRequest(DHTTransportContact direct_sender, byte[] request, byte[] signature) keyCreated(HashWrapper key, boolean local) Create a new storage key for a given keyvoidkeyDeleted(DHTStorageKey adapter_key) voidkeyRead(DHTStorageKey adapter_key, DHTTransportContact contact) voidsetStorageForKey(String key, byte[] data) voidvalueAdded(DHTStorageKey key, DHTTransportValue value) voidvalueDeleted(DHTStorageKey key, DHTTransportValue value) voidvalueUpdated(DHTStorageKey key, DHTTransportValue old_value, DHTTransportValue new_value)
-
Field Details
-
delegate
-
-
Constructor Details
-
adapterFacade
-
-
Method Details
-
getNetwork
public int getNetwork()- Specified by:
getNetworkin interfaceDHTStorageAdapter
-
keyCreated
Description copied from interface:DHTStorageAdapterCreate a new storage key for a given key- Specified by:
keyCreatedin interfaceDHTStorageAdapter- Returns:
- null if the key shouldn't be allocated (e.g.out of space)
-
keyDeleted
- Specified by:
keyDeletedin interfaceDHTStorageAdapter
-
getKeyCount
public int getKeyCount()- Specified by:
getKeyCountin interfaceDHTStorageAdapter
-
keyRead
- Specified by:
keyReadin interfaceDHTStorageAdapter
-
deserialiseStats
- Specified by:
deserialiseStatsin interfaceDHTStorageAdapter- Throws:
IOException
-
valueAdded
- Specified by:
valueAddedin interfaceDHTStorageAdapter
-
valueUpdated
public void valueUpdated(DHTStorageKey key, DHTTransportValue old_value, DHTTransportValue new_value) - Specified by:
valueUpdatedin interfaceDHTStorageAdapter
-
valueDeleted
- Specified by:
valueDeletedin interfaceDHTStorageAdapter
-
isDiversified
public boolean isDiversified(byte[] key) - Specified by:
isDiversifiedin interfaceDHTStorageAdapter
-
getExistingDiversification
public byte[][] getExistingDiversification(byte[] key, boolean put_operation, boolean exhaustive_get, int max_depth) - Specified by:
getExistingDiversificationin 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:
createNewDiversificationin interfaceDHTStorageAdapter
-
getNextValueVersions
public int getNextValueVersions(int num) - Specified by:
getNextValueVersionsin interfaceDHTStorageAdapter
-
keyBlockRequest
public DHTStorageBlock keyBlockRequest(DHTTransportContact direct_sender, byte[] request, byte[] signature) - Specified by:
keyBlockRequestin interfaceDHTStorageAdapter
-
getKeyBlockDetails
- Specified by:
getKeyBlockDetailsin interfaceDHTStorageAdapter
-
getDirectKeyBlocks
- Specified by:
getDirectKeyBlocksin interfaceDHTStorageAdapter
-
getKeyForKeyBlock
public byte[] getKeyForKeyBlock(byte[] request) - Specified by:
getKeyForKeyBlockin interfaceDHTStorageAdapter
-
setStorageForKey
- Specified by:
setStorageForKeyin interfaceDHTStorageAdapter
-
getStorageForKey
- Specified by:
getStorageForKeyin interfaceDHTStorageAdapter
-
getRemoteFreqDivCount
public int getRemoteFreqDivCount()- Specified by:
getRemoteFreqDivCountin interfaceDHTStorageAdapter
-
getRemoteSizeDivCount
public int getRemoteSizeDivCount()- Specified by:
getRemoteSizeDivCountin interfaceDHTStorageAdapter
-