Record Class Bodies.Ack
java.lang.Object
java.lang.Record
ai.badmonkey.agentspaces.peering.wire.Bodies.Ack
- Record Components:
nonce- the correlated PING or PING_REQ nonceonBehalf- the probed peer when this ACK answers a PING_REQ; else nullroot- SHA-256 over the sender's per-stream digest hashes, or nullhashes- SHA-256 of the sender's digest per stream, or nullhave- the sender's recently forwarded items, or null
- Enclosing class:
Bodies
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.hashes()Returns the value of thehashesrecord component.have()Returns the value of thehaverecord component.longnonce()Returns the value of thenoncerecord component.onBehalf()Returns the value of theonBehalfrecord component.byte[]root()Returns the value of therootrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Ack
A bare acknowledgement, as older nodes and relays send it. -
Ack
public Ack(long nonce, PeerId onBehalf, byte[] root, Map<String, byte[]> hashes, List<Bodies.HaveItem> have) Creates an instance of aAckrecord class.
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
nonce
-
onBehalf
-
root
-
hashes
-
have
-