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 int
private final byte
private final int
private final byte
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DHTTransportAlternativeContactImpl
(byte _network_type, byte _version, short _age, byte[] _encoded) -
Method Summary
Modifier and TypeMethodDescriptionint
getID()
A good-enough ID to spot duplicates - must be equal to Arrays.hashCode( BEncode( getProperties()));int
int
int
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.biglybt.core.dht.transport.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:
getNetworkType
in interfaceDHTTransportAlternativeContact
-
getVersion
public int getVersion()- Specified by:
getVersion
in interfaceDHTTransportAlternativeContact
-
getID
public int getID()Description copied from interface:DHTTransportAlternativeContact
A good-enough ID to spot duplicates - must be equal to Arrays.hashCode( BEncode( getProperties()));- Specified by:
getID
in interfaceDHTTransportAlternativeContact
- Returns:
-
getLastAlive
public int getLastAlive()- Specified by:
getLastAlive
in interfaceDHTTransportAlternativeContact
- Returns:
- alive time in seconds since "mono time" start - can be negative
-
getProperties
- Specified by:
getProperties
in interfaceDHTTransportAlternativeContact
-