com.aelitis.azureus.core.dht.db.impl
Class DHTDBImpl.adapterFacade
java.lang.Object
com.aelitis.azureus.core.dht.db.impl.DHTDBImpl.adapterFacade
- All Implemented Interfaces:
- DHTStorageAdapter
- Enclosing class:
- DHTDBImpl
protected class DHTDBImpl.adapterFacade
- extends java.lang.Object
- implements DHTStorageAdapter
Method Summary |
byte[][] |
createNewDiversification(java.lang.String description,
DHTTransportContact cause,
byte[] key,
boolean put_operation,
byte diversification_type,
boolean exhaustive_get,
int max_depth)
|
DHTStorageKeyStats |
deserialiseStats(java.io.DataInputStream is)
|
DHTStorageBlock[] |
getDirectKeyBlocks()
|
byte[][] |
getExistingDiversification(byte[] key,
boolean put_operation,
boolean exhaustive_get,
int max_depth)
|
DHTStorageBlock |
getKeyBlockDetails(byte[] key)
|
int |
getKeyCount()
|
byte[] |
getKeyForKeyBlock(byte[] request)
|
int |
getNetwork()
|
int |
getNextValueVersions(int num)
|
int |
getRemoteFreqDivCount()
|
int |
getRemoteSizeDivCount()
|
byte[] |
getStorageForKey(java.lang.String key)
|
boolean |
isDiversified(byte[] key)
|
DHTStorageBlock |
keyBlockRequest(DHTTransportContact direct_sender,
byte[] request,
byte[] signature)
|
DHTStorageKey |
keyCreated(HashWrapper key,
boolean local)
Create a new storage key for a given key |
void |
keyDeleted(DHTStorageKey adapter_key)
|
void |
keyRead(DHTStorageKey adapter_key,
DHTTransportContact contact)
|
void |
setStorageForKey(java.lang.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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DHTDBImpl.adapterFacade
protected DHTDBImpl.adapterFacade(DHTStorageAdapter _delegate)
getNetwork
public int getNetwork()
- Specified by:
getNetwork
in interface DHTStorageAdapter
keyCreated
public DHTStorageKey keyCreated(HashWrapper key,
boolean local)
- Description copied from interface:
DHTStorageAdapter
- Create a new storage key for a given key
- Specified by:
keyCreated
in interface DHTStorageAdapter
- Returns:
- null if the key shouldn't be allocated (e.g.out of space)
keyDeleted
public void keyDeleted(DHTStorageKey adapter_key)
- Specified by:
keyDeleted
in interface DHTStorageAdapter
getKeyCount
public int getKeyCount()
- Specified by:
getKeyCount
in interface DHTStorageAdapter
keyRead
public void keyRead(DHTStorageKey adapter_key,
DHTTransportContact contact)
- Specified by:
keyRead
in interface DHTStorageAdapter
deserialiseStats
public DHTStorageKeyStats deserialiseStats(java.io.DataInputStream is)
throws java.io.IOException
- Specified by:
deserialiseStats
in interface DHTStorageAdapter
- Throws:
java.io.IOException
valueAdded
public void valueAdded(DHTStorageKey key,
DHTTransportValue value)
- Specified by:
valueAdded
in interface DHTStorageAdapter
valueUpdated
public void valueUpdated(DHTStorageKey key,
DHTTransportValue old_value,
DHTTransportValue new_value)
- Specified by:
valueUpdated
in interface DHTStorageAdapter
valueDeleted
public void valueDeleted(DHTStorageKey key,
DHTTransportValue value)
- Specified by:
valueDeleted
in interface DHTStorageAdapter
isDiversified
public boolean isDiversified(byte[] key)
- Specified by:
isDiversified
in interface DHTStorageAdapter
getExistingDiversification
public byte[][] getExistingDiversification(byte[] key,
boolean put_operation,
boolean exhaustive_get,
int max_depth)
- Specified by:
getExistingDiversification
in interface DHTStorageAdapter
createNewDiversification
public byte[][] createNewDiversification(java.lang.String description,
DHTTransportContact cause,
byte[] key,
boolean put_operation,
byte diversification_type,
boolean exhaustive_get,
int max_depth)
- Specified by:
createNewDiversification
in interface DHTStorageAdapter
getNextValueVersions
public int getNextValueVersions(int num)
- Specified by:
getNextValueVersions
in interface DHTStorageAdapter
keyBlockRequest
public DHTStorageBlock keyBlockRequest(DHTTransportContact direct_sender,
byte[] request,
byte[] signature)
- Specified by:
keyBlockRequest
in interface DHTStorageAdapter
getKeyBlockDetails
public DHTStorageBlock getKeyBlockDetails(byte[] key)
- Specified by:
getKeyBlockDetails
in interface DHTStorageAdapter
getDirectKeyBlocks
public DHTStorageBlock[] getDirectKeyBlocks()
- Specified by:
getDirectKeyBlocks
in interface DHTStorageAdapter
getKeyForKeyBlock
public byte[] getKeyForKeyBlock(byte[] request)
- Specified by:
getKeyForKeyBlock
in interface DHTStorageAdapter
setStorageForKey
public void setStorageForKey(java.lang.String key,
byte[] data)
- Specified by:
setStorageForKey
in interface DHTStorageAdapter
getStorageForKey
public byte[] getStorageForKey(java.lang.String key)
- Specified by:
getStorageForKey
in interface DHTStorageAdapter
getRemoteFreqDivCount
public int getRemoteFreqDivCount()
- Specified by:
getRemoteFreqDivCount
in interface DHTStorageAdapter
getRemoteSizeDivCount
public int getRemoteSizeDivCount()
- Specified by:
getRemoteSizeDivCount
in interface DHTStorageAdapter