Class DDBaseContactImpl
java.lang.Object
com.biglybt.pifimpl.local.ddb.DDBaseContactImpl
- All Implemented Interfaces:
DistributedDatabaseContact
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDDBaseContactImpl(DDBaseImpl _ddb, DHTPluginContact _contact) -
Method Summary
Modifier and TypeMethodDescriptioncall(DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseValue data, long timeout) protected DHTPluginContactbyte[]getID()getName()intintbooleanisAlive(long timeout) voidisAlive(long timeout, DistributedDatabaseListener listener) booleanbooleanTries to open a NAT tunnel to the contact.read(DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseKey key, long timeout) voidwrite(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:
getIDin interfaceDistributedDatabaseContact
-
getName
- Specified by:
getNamein interfaceDistributedDatabaseContact
-
getVersion
public int getVersion()- Specified by:
getVersionin interfaceDistributedDatabaseContact
-
getAddress
- Specified by:
getAddressin interfaceDistributedDatabaseContact
-
getNetwork
public int getNetwork()- Specified by:
getNetworkin interfaceDistributedDatabaseContact
-
isAlive
public boolean isAlive(long timeout) - Specified by:
isAlivein interfaceDistributedDatabaseContact
-
isAlive
- Specified by:
isAlivein interfaceDistributedDatabaseContact
-
isOrHasBeenLocal
public boolean isOrHasBeenLocal()- Specified by:
isOrHasBeenLocalin interfaceDistributedDatabaseContact
-
exportToMap
- Specified by:
exportToMapin interfaceDistributedDatabaseContact
-
openTunnel
public boolean openTunnel()Description copied from interface:DistributedDatabaseContactTries to open a NAT tunnel to the contact. Should only be used if direct contact fails- Specified by:
openTunnelin interfaceDistributedDatabaseContact- Returns:
-
call
public DistributedDatabaseValue call(DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseValue data, long timeout) throws DistributedDatabaseException - Specified by:
callin interfaceDistributedDatabaseContact- Throws:
DistributedDatabaseException
-
write
public void write(DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseKey key, DistributedDatabaseValue value, long timeout) throws DistributedDatabaseException - Specified by:
writein interfaceDistributedDatabaseContact- Throws:
DistributedDatabaseException
-
read
public DistributedDatabaseValue read(DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseKey key, long timeout) throws DistributedDatabaseException - Specified by:
readin interfaceDistributedDatabaseContact- Throws:
DistributedDatabaseException
-
getContact
-