public class Peer extends java.util.HashMap<Peer.Schema,java.lang.String> implements java.lang.Comparable<Peer>, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Peer.Schema |
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
private long |
time |
Constructor and Description |
---|
Peer() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Peer o)
compare the peer to another peer.
|
boolean |
equals(java.lang.Object o)
check if two peers are equal:
two peers are equal if they have the same hash.
|
int |
hashCode()
get the hash code of the peer.
|
int |
lastseen()
Get the number of minutes that the peer which returns the peer list knows when the peer was last seen.
|
long |
lastseenTime()
get the absolute time when this peer was seen in the network
|
static void |
main(java.lang.String[] args) |
boolean |
supportsSolr()
check if the peer supports the solr interface
|
float |
version()
get the version number of the peer
|
private static final long serialVersionUID
private long time
public int lastseen()
public long lastseenTime()
public float version()
public boolean supportsSolr()
public int compareTo(Peer o)
compareTo
in interface java.lang.Comparable<Peer>
public int hashCode()
hashCode
in interface java.util.Map<Peer.Schema,java.lang.String>
hashCode
in class java.util.AbstractMap<Peer.Schema,java.lang.String>
public boolean equals(java.lang.Object o)
equals
in interface java.util.Map<Peer.Schema,java.lang.String>
equals
in class java.util.AbstractMap<Peer.Schema,java.lang.String>
public static void main(java.lang.String[] args)