org.gudy.azureus2.plugins.ddb
Interface DistributedDatabase

All Known Implementing Classes:
DDBaseImpl

public interface DistributedDatabase

Author:
parg

Field Summary
static int DHT_CVS
           
static int DHT_MAIN
           
static byte DT_FREQUENCY
           
static byte DT_NONE
           
static byte DT_SIZE
           
static int OP_EXHAUSTIVE_READ
           
static int OP_NONE
           
static int OP_PRIORITY_HIGH
           
 
Method Summary
 void addListener(DistributedDatabaseListener l)
           
 void addTransferHandler(DistributedDatabaseTransferType type, DistributedDatabaseTransferHandler handler)
           
 DistributedDatabaseKey createKey(java.lang.Object key)
           
 DistributedDatabaseKey createKey(java.lang.Object key, java.lang.String description)
           
 DistributedDatabaseValue createValue(java.lang.Object value)
           
 void delete(DistributedDatabaseListener listener, DistributedDatabaseKey key)
           
 void delete(DistributedDatabaseListener listener, DistributedDatabaseKey key, DistributedDatabaseContact[] targets)
           
 DHTPluginInterface getDHTPlugin()
           
 DistributedDatabaseContact getLocalContact()
           
 java.lang.String getNetwork()
           
 DistributedDatabaseTransferType getStandardTransferType(int standard_type)
           
 java.util.List<DistributedDatabaseValue> getValues(DistributedDatabaseKey key)
          Get all locally held (direct+indirect) values for a key
 DistributedDatabaseContact importContact(java.net.InetSocketAddress address)
           
 DistributedDatabaseContact importContact(java.net.InetSocketAddress address, byte protocol_version)
           
 DistributedDatabaseContact importContact(java.net.InetSocketAddress address, byte protocol_version, int preferred_dht)
           
 DistributedDatabaseContact importContact(java.util.Map<java.lang.String,java.lang.Object> map)
           
 boolean isAvailable()
           
 boolean isExtendedUseAllowed()
           
 boolean isInitialized()
           
 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 removeListener(DistributedDatabaseListener l)
           
 void write(DistributedDatabaseListener listener, DistributedDatabaseKey key, DistributedDatabaseValue value)
           
 void write(DistributedDatabaseListener listener, DistributedDatabaseKey key, DistributedDatabaseValue[] values)
           
 

Field Detail

OP_NONE

static final int OP_NONE
See Also:
Constant Field Values

OP_EXHAUSTIVE_READ

static final int OP_EXHAUSTIVE_READ
See Also:
Constant Field Values

OP_PRIORITY_HIGH

static final int OP_PRIORITY_HIGH
See Also:
Constant Field Values

DT_NONE

static final byte DT_NONE
See Also:
Constant Field Values

DT_FREQUENCY

static final byte DT_FREQUENCY
See Also:
Constant Field Values

DT_SIZE

static final byte DT_SIZE
See Also:
Constant Field Values

DHT_MAIN

static final int DHT_MAIN
See Also:
Constant Field Values

DHT_CVS

static final int DHT_CVS
See Also:
Constant Field Values
Method Detail

isAvailable

boolean isAvailable()

isInitialized

boolean isInitialized()

isExtendedUseAllowed

boolean isExtendedUseAllowed()

getNetwork

java.lang.String getNetwork()

getDHTPlugin

DHTPluginInterface getDHTPlugin()

getLocalContact

DistributedDatabaseContact getLocalContact()

createKey

DistributedDatabaseKey createKey(java.lang.Object key)
                                 throws DistributedDatabaseException
Throws:
DistributedDatabaseException

createKey

DistributedDatabaseKey createKey(java.lang.Object key,
                                 java.lang.String description)
                                 throws DistributedDatabaseException
Throws:
DistributedDatabaseException

createValue

DistributedDatabaseValue createValue(java.lang.Object value)
                                     throws DistributedDatabaseException
Throws:
DistributedDatabaseException

importContact

DistributedDatabaseContact importContact(java.net.InetSocketAddress address)
                                         throws DistributedDatabaseException
Throws:
DistributedDatabaseException

importContact

DistributedDatabaseContact importContact(java.net.InetSocketAddress address,
                                         byte protocol_version)
                                         throws DistributedDatabaseException
Throws:
DistributedDatabaseException

importContact

DistributedDatabaseContact importContact(java.net.InetSocketAddress address,
                                         byte protocol_version,
                                         int preferred_dht)
                                         throws DistributedDatabaseException
Throws:
DistributedDatabaseException

importContact

DistributedDatabaseContact importContact(java.util.Map<java.lang.String,java.lang.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

java.util.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

void addListener(DistributedDatabaseListener l)

removeListener

void removeListener(DistributedDatabaseListener l)