Class DHTTransportAlternativeContactImpl
java.lang.Object
com.biglybt.core.dht.transport.udp.impl.DHTTransportAlternativeContactImpl
- All Implemented Interfaces:
DHTTransportAlternativeContact
public class DHTTransportAlternativeContactImpl
extends Object
implements DHTTransportAlternativeContact
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]private final intprivate final byteprivate final intprivate final byte -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDHTTransportAlternativeContactImpl(byte _network_type, byte _version, short _age, byte[] _encoded) -
Method Summary
Modifier and TypeMethodDescriptionintgetID()A good-enough ID to spot duplicates - must be equal to Arrays.hashCode( BEncode( getProperties()));intintintMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DHTTransportAlternativeContact
getAge
-
Field Details
-
network_type
private final byte network_type -
version
private final byte version -
seen_secs
private final int seen_secs -
encoded
private final byte[] encoded -
id
private final int id
-
-
Constructor Details
-
DHTTransportAlternativeContactImpl
protected DHTTransportAlternativeContactImpl(byte _network_type, byte _version, short _age, byte[] _encoded)
-
-
Method Details
-
getNetworkType
public int getNetworkType()- Specified by:
getNetworkTypein interfaceDHTTransportAlternativeContact
-
getVersion
public int getVersion()- Specified by:
getVersionin interfaceDHTTransportAlternativeContact
-
getID
public int getID()Description copied from interface:DHTTransportAlternativeContactA good-enough ID to spot duplicates - must be equal to Arrays.hashCode( BEncode( getProperties()));- Specified by:
getIDin interfaceDHTTransportAlternativeContact- Returns:
-
getLastAlive
public int getLastAlive()- Specified by:
getLastAlivein interfaceDHTTransportAlternativeContact- Returns:
- alive time in seconds since "mono time" start - can be negative
-
getProperties
- Specified by:
getPropertiesin interfaceDHTTransportAlternativeContact
-