Interface DistributedDatabase
- All Known Implementing Classes:
DDBaseImpl
public interface DistributedDatabase
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final bytestatic final bytestatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddTransferHandler(DistributedDatabaseTransferType type, DistributedDatabaseTransferHandler handler) createValue(Object value) voiddelete(DistributedDatabaseListener listener, DistributedDatabaseKey key) voiddelete(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) booleanbooleanbooleanvoidread(DistributedDatabaseListener listener, DistributedDatabaseKey key, long timeout) voidread(DistributedDatabaseListener listener, DistributedDatabaseKey key, long timeout, int options) voidreadKeyStats(DistributedDatabaseListener listener, DistributedDatabaseKey key, long timeout) voidvoidwrite(DistributedDatabaseListener listener, DistributedDatabaseKey key, DistributedDatabaseValue value) voidwrite(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
-