Record Class PushBundle
java.lang.Object
java.lang.Record
ai.badmonkey.agentspaces.pdt.refs.PushBundle
- Record Components:
v-VERSIONroot- the version's rootseq- the head's seqpart- this part, from 0parts- the parts of the delta, 1 toMAX_PARTSnodes- the node bytes of this part
@WireRecord
public record PushBundle(int v, String root, long seq, int part, int parts, List<byte[]> nodes)
extends Record
One part of a pushed delta (PDT 2 phase 5, P2-P-01; srad/agentspaces-pdt2.md §3.4, §6.10.4): the payload of a
rumour on a ref's stream
pdt:<space>:<name>. A writer splits the nodes of a version's delta, parents first,
into parts of at most MAX_BYTES bytes of nodes. The bundle carries no signature: a receiver stores a node
only when it hashes to a CID that the root of a live, signed head reaches (P2-P-02). The record is read strictly
(CborCodec.fromWire), and it changes shape only under a new stream prefix (rule 16, P2-F-08); a level-1
member relays the payload by item id without decoding it.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPushBundle(int v, String root, long seq, int part, int parts, List<byte[]> nodes) Creates an instance of aPushBundlerecord class. -
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.List<byte[]> nodes()Returns the value of thenodesrecord component.intpart()Returns the value of thepartrecord component.intparts()Returns the value of thepartsrecord component.root()Returns the value of therootrecord component.longseq()Returns the value of theseqrecord component.final StringtoString()Returns a string representation of this record class.intv()Returns the value of thevrecord component.Checks the version, the root, the seq, the part, and the node bytes.
-
Field Details
-
VERSION
public static final int VERSIONThe version of the record.- See Also:
-
MAX_BYTES
public static final int MAX_BYTESThe most bytes of nodes one bundle carries: 1 MiB (§3.4).- See Also:
-
MAX_PARTS
public static final int MAX_PARTSThe most parts of one delta: a delta of 64 MiB at most, past everypush.max-bytesa host may set.- See Also:
-
-
Constructor Details
-
PushBundle
Creates an instance of aPushBundlerecord class.
-
-
Method Details
-
violation
-
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. -
v
-
root
-
seq
-
part
-
parts
-
nodes
-