seqeron 0.18.0
Loading...
Searching...
No Matches
Org.Limitless.Seqeron.Sequencer.Client.IngressPublisher Class Referencesealed

Encode-and-offer for cluster ingress. An instance owning its buffer rather than free functions over a stack array, and the payload arrives pre-encoded rather than through a Fill, as in Java. More...

Public Member Functions

 IngressPublisher (IIngressTracker tracker=null)
 A publisher that tracks every frame it places with tracker , and sends nothing while it holds.
 
Publish PublishPayload (IIngressSender sender, int sourceId, int connectionId, int payloadId, int groupMask, IDirectBuffer payload, int payloadLength)
 Wraps one application payload in an Unsequenced frame and offers it.
 
Publish PublishSystem (IIngressSender sender, int sourceId, int connectionId, int systemEventType, IDirectBuffer body, int bodyLength)
 The same for one of seqeron's own events (doc/seqeron-protocol-spec.md §7), in an UnsequencedSystem frame.
 

Detailed Description

Encode-and-offer for cluster ingress. An instance owning its buffer rather than free functions over a stack array, and the payload arrives pre-encoded rather than through a Fill, as in Java.

Given an IIngressTracker (spec §16 A-4, A-5), each published frame is tracked under the sender's session and term, and nothing is sent while the tracker holds or is full.

Not thread-safe: one publisher per producing thread. IngressPublisher.java and sequencer/client/IngressPublisher.hpp are its twins.

Constructor & Destructor Documentation

◆ IngressPublisher()

Org.Limitless.Seqeron.Sequencer.Client.IngressPublisher.IngressPublisher ( IIngressTracker  tracker = null)
inline

A publisher that tracks every frame it places with tracker , and sends nothing while it holds.

Parameters
trackerthe tracker, or null to track nothing

Member Function Documentation

◆ PublishPayload()

Publish Org.Limitless.Seqeron.Sequencer.Client.IngressPublisher.PublishPayload ( IIngressSender  sender,
int  sourceId,
int  connectionId,
int  payloadId,
int  groupMask,
IDirectBuffer  payload,
int  payloadLength 
)
inline

Wraps one application payload in an Unsequenced frame and offers it.

Two header fields are not parameters: the frame's template, and the cluster session, which is the sender's. What varies is sourceId — for a reply, the requester's rather than this process's own — connectionId, payloadId, groupMask, and the payload.

Parameters
senderthe session to offer it on
sourceIdthe producer the frame is on behalf of
connectionIdthe connection it belongs to, or -1 for a producer-scoped one
payloadIdwhich protocol the payload speaks
groupMaskthe groups whose queues the frame reaches, the producer's own included
payloadthe payload's bytes, whatever encoding they carry: the tier copies them through unopened, so an SBE payload includes its own 8-byte MessageHeader and a raw one no framing at all
payloadLengthbytes of payload from offset 0

◆ PublishSystem()

Publish Org.Limitless.Seqeron.Sequencer.Client.IngressPublisher.PublishSystem ( IIngressSender  sender,
int  sourceId,
int  connectionId,
int  systemEventType,
IDirectBuffer  body,
int  bodyLength 
)
inline

The same for one of seqeron's own events (doc/seqeron-protocol-spec.md §7), in an UnsequencedSystem frame.

Parameters
senderthe session to offer it on
sourceIdthe producer the frame is on behalf of
connectionIdthe connection it belongs to, or -1 for a producer-scoped one
systemEventTypewhich event body holds
bodythe event's SBE block, with no MessageHeader of its own — systemEventType is what names it
bodyLengthbytes of body from offset 0

The documentation for this class was generated from the following file: