Package com.biglybt.pifimpl.local.ddb
Class DDBaseContactImpl
java.lang.Object
com.biglybt.pifimpl.local.ddb.DDBaseContactImpl
- All Implemented Interfaces:
DistributedDatabaseContact
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DDBaseContactImpl
(DDBaseImpl _ddb, DHTPluginContact _contact) -
Method Summary
Modifier and TypeMethodDescriptioncall
(DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseValue data, long timeout) protected DHTPluginContact
byte[]
getID()
getName()
int
int
boolean
isAlive
(long timeout) void
isAlive
(long timeout, DistributedDatabaseListener listener) boolean
boolean
Tries to open a NAT tunnel to the contact.read
(DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseKey key, long timeout) void
write
(DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseKey key, DistributedDatabaseValue value, long timeout)
-
Field Details
-
ddb
-
contact
-
-
Constructor Details
-
DDBaseContactImpl
-
-
Method Details
-
getID
public byte[] getID()- Specified by:
getID
in interfaceDistributedDatabaseContact
-
getName
- Specified by:
getName
in interfaceDistributedDatabaseContact
-
getVersion
public int getVersion()- Specified by:
getVersion
in interfaceDistributedDatabaseContact
-
getAddress
- Specified by:
getAddress
in interfaceDistributedDatabaseContact
-
getNetwork
public int getNetwork()- Specified by:
getNetwork
in interfaceDistributedDatabaseContact
-
isAlive
public boolean isAlive(long timeout) - Specified by:
isAlive
in interfaceDistributedDatabaseContact
-
isAlive
- Specified by:
isAlive
in interfaceDistributedDatabaseContact
-
isOrHasBeenLocal
public boolean isOrHasBeenLocal()- Specified by:
isOrHasBeenLocal
in interfaceDistributedDatabaseContact
-
exportToMap
- Specified by:
exportToMap
in interfaceDistributedDatabaseContact
-
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 interfaceDistributedDatabaseContact
- Returns:
-
call
public DistributedDatabaseValue call(DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseValue data, long timeout) throws DistributedDatabaseException - Specified by:
call
in interfaceDistributedDatabaseContact
- Throws:
DistributedDatabaseException
-
write
public void write(DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseKey key, DistributedDatabaseValue value, long timeout) throws DistributedDatabaseException - Specified by:
write
in interfaceDistributedDatabaseContact
- Throws:
DistributedDatabaseException
-
read
public DistributedDatabaseValue read(DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseKey key, long timeout) throws DistributedDatabaseException - Specified by:
read
in interfaceDistributedDatabaseContact
- Throws:
DistributedDatabaseException
-
getContact
-