Class DHTRouterContactWrapper
java.lang.Object
com.biglybt.core.dht.router.DHTRouterContactWrapper
- All Implemented Interfaces:
DHTRouterContact
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DHTRouterContactbyte[]getID()longtime between first establishing the contact was alive and now, assuming that its not failing.booleanindicates whether or not a message has been received from, or an operation has successfully been made to, the contact.booleanisAlive()Whether or not the contact's last interaction was successfulbooleanReturns whether this router contact is in a bucket.booleanWhether or not the contact has failed once or more since last alive (if ever)booleanReturns whether this router contact is a replacement.
-
Field Details
-
delegate
-
-
Constructor Details
-
DHTRouterContactWrapper
-
-
Method Details
-
getDelegate
-
getID
public byte[] getID()- Specified by:
getIDin interfaceDHTRouterContact
-
getAttachment
- Specified by:
getAttachmentin interfaceDHTRouterContact
-
hasBeenAlive
public boolean hasBeenAlive()Description copied from interface:DHTRouterContactindicates whether or not a message has been received from, or an operation has successfully been made to, the contact.- Specified by:
hasBeenAlivein interfaceDHTRouterContact- Returns:
-
isFailing
public boolean isFailing()Description copied from interface:DHTRouterContactWhether or not the contact has failed once or more since last alive (if ever)- Specified by:
isFailingin interfaceDHTRouterContact- Returns:
-
isAlive
public boolean isAlive()Description copied from interface:DHTRouterContactWhether or not the contact's last interaction was successful- Specified by:
isAlivein interfaceDHTRouterContact- Returns:
-
getTimeAlive
public long getTimeAlive()Description copied from interface:DHTRouterContacttime between first establishing the contact was alive and now, assuming that its not failing. 0 -> failing- Specified by:
getTimeAlivein interfaceDHTRouterContact- Returns:
-
getString
- Specified by:
getStringin interfaceDHTRouterContact
-
isBucketEntry
public boolean isBucketEntry()Description copied from interface:DHTRouterContactReturns whether this router contact is in a bucket.- Specified by:
isBucketEntryin interfaceDHTRouterContact- Returns:
trueif in a bucket,falseotherwise
-
isReplacement
public boolean isReplacement()Description copied from interface:DHTRouterContactReturns whether this router contact is a replacement.- Specified by:
isReplacementin interfaceDHTRouterContact- Returns:
trueif a replacement,falseotherwise
-