Package com.biglybt.core.dht.router
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 DHTRouterContact
byte[]
getID()
long
time between first establishing the contact was alive and now, assuming that its not failing.boolean
indicates whether or not a message has been received from, or an operation has successfully been made to, the contact.boolean
isAlive()
Whether or not the contact's last interaction was successfulboolean
Returns whether this router contact is in a bucket.boolean
Whether or not the contact has failed once or more since last alive (if ever)boolean
Returns whether this router contact is a replacement.
-
Field Details
-
delegate
-
-
Constructor Details
-
DHTRouterContactWrapper
-
-
Method Details
-
getDelegate
-
getID
public byte[] getID()- Specified by:
getID
in interfaceDHTRouterContact
-
getAttachment
- Specified by:
getAttachment
in interfaceDHTRouterContact
-
hasBeenAlive
public boolean hasBeenAlive()Description copied from interface:DHTRouterContact
indicates whether or not a message has been received from, or an operation has successfully been made to, the contact.- Specified by:
hasBeenAlive
in interfaceDHTRouterContact
- Returns:
-
isFailing
public boolean isFailing()Description copied from interface:DHTRouterContact
Whether or not the contact has failed once or more since last alive (if ever)- Specified by:
isFailing
in interfaceDHTRouterContact
- Returns:
-
isAlive
public boolean isAlive()Description copied from interface:DHTRouterContact
Whether or not the contact's last interaction was successful- Specified by:
isAlive
in interfaceDHTRouterContact
- Returns:
-
getTimeAlive
public long getTimeAlive()Description copied from interface:DHTRouterContact
time between first establishing the contact was alive and now, assuming that its not failing. 0 -> failing- Specified by:
getTimeAlive
in interfaceDHTRouterContact
- Returns:
-
getString
- Specified by:
getString
in interfaceDHTRouterContact
-
isBucketEntry
public boolean isBucketEntry()Description copied from interface:DHTRouterContact
Returns whether this router contact is in a bucket.- Specified by:
isBucketEntry
in interfaceDHTRouterContact
- Returns:
true
if in a bucket,false
otherwise
-
isReplacement
public boolean isReplacement()Description copied from interface:DHTRouterContact
Returns whether this router contact is a replacement.- Specified by:
isReplacement
in interfaceDHTRouterContact
- Returns:
true
if a replacement,false
otherwise
-