org.klomp.snark.dht
Class NID

java.lang.Object
  extended by net.i2p.data.DataStructureImpl
      extended by net.i2p.data.SimpleDataStructure
          extended by net.i2p.crypto.SHA1Hash
              extended by org.klomp.snark.dht.NID
All Implemented Interfaces:
DataStructure

public class NID
extends SHA1Hash

A 20-byte peer ID, used as a Map key in lots of places. Must be public for constructor in KBucketSet.generateRandomKey()

Since:
0.9.2
Author:
zzz

Field Summary
 
Fields inherited from class net.i2p.crypto.SHA1Hash
HASH_LENGTH
 
Fields inherited from class net.i2p.data.SimpleDataStructure
_data, _length
 
Constructor Summary
NID()
           
NID(byte[] data)
           
 
Method Summary
 long lastSeen()
           
 void setLastSeen()
           
 boolean timeout()
           
 
Methods inherited from class net.i2p.crypto.SHA1Hash
hashCode, length, readBytes, setData
 
Methods inherited from class net.i2p.data.SimpleDataStructure
calculateHash, equals, fromBase64, fromByteArray, getData, toBase64, toByteArray, toString, writeBytes
 
Methods inherited from class net.i2p.data.DataStructureImpl
read
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NID

public NID()

NID

public NID(byte[] data)
Method Detail

lastSeen

public long lastSeen()

setLastSeen

public void setLastSeen()

timeout

public boolean timeout()
Returns:
if more than max timeouts