org.gudy.azureus2.plugins.ddb
Interface DistributedDatabaseContact

All Known Implementing Classes:
DDBaseContactImpl

public interface DistributedDatabaseContact

Author:
parg

Method Summary
 DistributedDatabaseValue call(DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseValue data, long timeout)
           
 Map<String,Object> exportToMap()
           
 InetSocketAddress getAddress()
           
 int getDHT()
           
 byte[] getID()
           
 String getName()
           
 int getVersion()
           
 boolean isAlive(long timeout)
           
 void isAlive(long timeout, DistributedDatabaseListener listener)
           
 boolean isOrHasBeenLocal()
           
 boolean openTunnel()
          Tries to open a NAT tunnel to the contact.
 DistributedDatabaseValue read(DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseKey key, long timeout)
           
 void write(DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseKey key, DistributedDatabaseValue data, long timeout)
           
 

Method Detail

getID

byte[] getID()

getName

String getName()

getVersion

int getVersion()

getAddress

InetSocketAddress getAddress()

getDHT

int getDHT()

isAlive

boolean isAlive(long timeout)

isAlive

void isAlive(long timeout,
             DistributedDatabaseListener listener)

isOrHasBeenLocal

boolean isOrHasBeenLocal()

exportToMap

Map<String,Object> exportToMap()

openTunnel

boolean openTunnel()
Tries to open a NAT tunnel to the contact. Should only be used if direct contact fails

Returns:

call

DistributedDatabaseValue call(DistributedDatabaseProgressListener listener,
                              DistributedDatabaseTransferType type,
                              DistributedDatabaseValue data,
                              long timeout)
                              throws DistributedDatabaseException
Throws:
DistributedDatabaseException

write

void write(DistributedDatabaseProgressListener listener,
           DistributedDatabaseTransferType type,
           DistributedDatabaseKey key,
           DistributedDatabaseValue data,
           long timeout)
           throws DistributedDatabaseException
Throws:
DistributedDatabaseException

read

DistributedDatabaseValue read(DistributedDatabaseProgressListener listener,
                              DistributedDatabaseTransferType type,
                              DistributedDatabaseKey key,
                              long timeout)
                              throws DistributedDatabaseException
Throws:
DistributedDatabaseException