public class NodeRegistration
A node registration state in the network map.
Constructor and Description |
---|
NodeRegistration(NodeInfo node,
long serial,
AddOrRemove type,
java.time.Instant expires)
A node registration state in the network map.
|
Modifier and Type | Method and Description |
---|---|
java.time.Instant |
getExpires() |
NodeInfo |
getNode() |
long |
getSerial() |
AddOrRemove |
getType() |
void |
setExpires(java.time.Instant p) |
java.lang.String |
toString() |
WireNodeRegistration |
toWire(java.security.PrivateKey privateKey)
Build a node registration in wire format.
|
public NodeRegistration(NodeInfo node, long serial, AddOrRemove type, java.time.Instant expires)
A node registration state in the network map.
node
- the node being added/removed.serial
- an increasing value which represents the version of this registration. Not expected to be sequential,
but later versions of the registration must have higher values (or they will be ignored by the map service).
Similar to the serial number on DNS records.type
- add if the node is being added to the map, or remove if a previous node is being removed (indicated as
going offline).expires
- when the registration expires. Only used when adding a node to a map.public WireNodeRegistration toWire(java.security.PrivateKey privateKey)
Build a node registration in wire format.
public java.lang.String toString()
public NodeInfo getNode()
public long getSerial()
public AddOrRemove getType()
public java.time.Instant getExpires()
public void setExpires(java.time.Instant p)