org.gudy.azureus2.pluginsimpl.local.ddb
Class DDBaseContactImpl
java.lang.Object
org.gudy.azureus2.pluginsimpl.local.ddb.DDBaseContactImpl
- All Implemented Interfaces:
- DistributedDatabaseContact
public class DDBaseContactImpl
- extends Object
- implements DistributedDatabaseContact
- Author:
- parg
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DDBaseContactImpl
protected DDBaseContactImpl(DDBaseImpl _ddb,
DHTPluginContact _contact)
getID
public byte[] getID()
- Specified by:
getID
in interface DistributedDatabaseContact
getName
public String getName()
- Specified by:
getName
in interface DistributedDatabaseContact
getAddress
public InetSocketAddress getAddress()
- Specified by:
getAddress
in interface DistributedDatabaseContact
getDHT
public int getDHT()
- Specified by:
getDHT
in interface DistributedDatabaseContact
isAlive
public boolean isAlive(long timeout)
- Specified by:
isAlive
in interface DistributedDatabaseContact
isAlive
public void isAlive(long timeout,
DistributedDatabaseListener listener)
- Specified by:
isAlive
in interface DistributedDatabaseContact
isOrHasBeenLocal
public boolean isOrHasBeenLocal()
- Specified by:
isOrHasBeenLocal
in interface DistributedDatabaseContact
exportToMap
public Map<String,Object> exportToMap()
- Specified by:
exportToMap
in interface DistributedDatabaseContact
openTunnel
public boolean openTunnel()
- Description copied from interface:
DistributedDatabaseContact
- Tries to open a NAT tunnel to the contact. Should only be used if direct contact fails
- Specified by:
openTunnel
in interface DistributedDatabaseContact
- Returns:
write
public void write(DistributedDatabaseTransferType type,
DistributedDatabaseKey key,
DistributedDatabaseValue data)
throws DistributedDatabaseException
- Specified by:
write
in interface DistributedDatabaseContact
- Throws:
DistributedDatabaseException
read
public DistributedDatabaseValue read(DistributedDatabaseProgressListener listener,
DistributedDatabaseTransferType type,
DistributedDatabaseKey key,
long timeout)
throws DistributedDatabaseException
- Specified by:
read
in interface DistributedDatabaseContact
- Throws:
DistributedDatabaseException
getContact
protected DHTPluginContact getContact()