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)
           
 java.util.Map<java.lang.String,java.lang.Object> exportToMap()
           
 java.net.InetSocketAddress getAddress()
           
 int getDHT()
           
 byte[] getID()
           
 java.lang.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

java.lang.String getName()

getVersion

int getVersion()

getAddress

java.net.InetSocketAddress getAddress()

getDHT

int getDHT()

isAlive

boolean isAlive(long timeout)

isAlive

void isAlive(long timeout,
             DistributedDatabaseListener listener)

isOrHasBeenLocal

boolean isOrHasBeenLocal()

exportToMap

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