Package com.biglybt.pif.ddb
Interface DistributedDatabase
- All Known Implementing Classes:
DDBaseImpl
public interface DistributedDatabase
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte
static final byte
static final byte
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addTransferHandler
(DistributedDatabaseTransferType type, DistributedDatabaseTransferHandler handler) createValue
(Object value) void
delete
(DistributedDatabaseListener listener, DistributedDatabaseKey key) void
delete
(DistributedDatabaseListener listener, DistributedDatabaseKey key, DistributedDatabaseContact[] targets) getStandardTransferType
(int standard_type) Get all locally held (direct+indirect) values for a keyimportContact
(InetSocketAddress address) importContact
(InetSocketAddress address, byte protocol_version) importContact
(InetSocketAddress address, byte protocol_version, int preferred_dht) importContact
(Map<String, Object> map) boolean
boolean
boolean
void
read
(DistributedDatabaseListener listener, DistributedDatabaseKey key, long timeout) void
read
(DistributedDatabaseListener listener, DistributedDatabaseKey key, long timeout, int options) void
readKeyStats
(DistributedDatabaseListener listener, DistributedDatabaseKey key, long timeout) void
void
write
(DistributedDatabaseListener listener, DistributedDatabaseKey key, DistributedDatabaseValue value) void
write
(DistributedDatabaseListener listener, DistributedDatabaseKey key, DistributedDatabaseValue[] values)
-
Field Details
-
OP_NONE
static final int OP_NONE- See Also:
-
OP_EXHAUSTIVE_READ
static final int OP_EXHAUSTIVE_READ- See Also:
-
OP_PRIORITY_HIGH
static final int OP_PRIORITY_HIGH- See Also:
-
DT_NONE
static final byte DT_NONE- See Also:
-
DT_FREQUENCY
static final byte DT_FREQUENCY- See Also:
-
DT_SIZE
static final byte DT_SIZE- See Also:
-
-
Method Details
-
isAvailable
boolean isAvailable() -
isInitialized
boolean isInitialized() -
isExtendedUseAllowed
boolean isExtendedUseAllowed() -
getNetwork
String getNetwork() -
getDHTPlugin
DHTPluginInterface getDHTPlugin() -
getLocalContact
DistributedDatabaseContact getLocalContact() -
createKey
- Throws:
DistributedDatabaseException
-
createKey
DistributedDatabaseKey createKey(Object key, String description) throws DistributedDatabaseException - Throws:
DistributedDatabaseException
-
createValue
- Throws:
DistributedDatabaseException
-
importContact
DistributedDatabaseContact importContact(InetSocketAddress address) throws DistributedDatabaseException - Throws:
DistributedDatabaseException
-
importContact
DistributedDatabaseContact importContact(InetSocketAddress address, byte protocol_version) throws DistributedDatabaseException - Throws:
DistributedDatabaseException
-
importContact
DistributedDatabaseContact importContact(InetSocketAddress address, byte protocol_version, int preferred_dht) throws DistributedDatabaseException - Throws:
DistributedDatabaseException
-
importContact
DistributedDatabaseContact importContact(Map<String, Object> map) throws DistributedDatabaseException- Throws:
DistributedDatabaseException
-
write
void write(DistributedDatabaseListener listener, DistributedDatabaseKey key, DistributedDatabaseValue value) throws DistributedDatabaseException - Throws:
DistributedDatabaseException
-
write
void write(DistributedDatabaseListener listener, DistributedDatabaseKey key, DistributedDatabaseValue[] values) throws DistributedDatabaseException - Throws:
DistributedDatabaseException
-
read
void read(DistributedDatabaseListener listener, DistributedDatabaseKey key, long timeout) throws DistributedDatabaseException - Throws:
DistributedDatabaseException
-
read
void read(DistributedDatabaseListener listener, DistributedDatabaseKey key, long timeout, int options) throws DistributedDatabaseException - Throws:
DistributedDatabaseException
-
readKeyStats
void readKeyStats(DistributedDatabaseListener listener, DistributedDatabaseKey key, long timeout) throws DistributedDatabaseException - Throws:
DistributedDatabaseException
-
getValues
List<DistributedDatabaseValue> getValues(DistributedDatabaseKey key) throws DistributedDatabaseException Get all locally held (direct+indirect) values for a key- Parameters:
key
-- Returns:
- Throws:
DistributedDatabaseException
-
delete
void delete(DistributedDatabaseListener listener, DistributedDatabaseKey key) throws DistributedDatabaseException - Throws:
DistributedDatabaseException
-
delete
void delete(DistributedDatabaseListener listener, DistributedDatabaseKey key, DistributedDatabaseContact[] targets) throws DistributedDatabaseException - Throws:
DistributedDatabaseException
-
addTransferHandler
void addTransferHandler(DistributedDatabaseTransferType type, DistributedDatabaseTransferHandler handler) throws DistributedDatabaseException - Throws:
DistributedDatabaseException
-
getStandardTransferType
DistributedDatabaseTransferType getStandardTransferType(int standard_type) throws DistributedDatabaseException - Throws:
DistributedDatabaseException
-
addListener
-
removeListener
-