GossipProducerSessionState

org.sigilaris.node.gossip.GossipProducerSessionState
final case class GossipProducerSessionState(sessionId: DirectionalSessionId, peer: PeerIdentity, peerCorrelationId: PeerCorrelationId, subscriptions: SessionSubscription, negotiated: NegotiatedSessionParameters, durableCursor: CompositeCursor, streamCursor: CompositeCursor, pendingReplay: Map[ChainTopic, Option[CursorToken]])

Mutable state of a producer-side gossip session, tracking cursors, replays, and stream progress.

Value parameters

durableCursor

the cursor persisted by the consumer via SetCursor

negotiated

the negotiated timing parameters

peer

the remote peer identity

peerCorrelationId

the peer correlation id

pendingReplay

chain-topics with pending Nack replay requests

sessionId

the directional session identifier

streamCursor

the cursor tracking the most recently emitted events

subscriptions

the session subscriptions

Attributes

Source
ProducerSession.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def advanceStreamCursor(chainTopic: ChainTopic, emitted: Vector[GossipEvent[_]]): GossipProducerSessionState

Advances the stream cursor to the last emitted event's cursor.

Advances the stream cursor to the last emitted event's cursor.

Value parameters

chainTopic

the chain-topic pair

emitted

the events that were emitted (may be empty)

Attributes

Returns

the updated state

Source
ProducerSession.scala

Clears the pending replay flag for a chain-topic.

Clears the pending replay flag for a chain-topic.

Value parameters

chainTopic

the chain-topic pair to clear

Attributes

Returns

the updated state

Source
ProducerSession.scala
def startCursorFor(chainTopic: ChainTopic): Option[CursorToken]

Determines the starting cursor for a chain-topic, preferring pending replay, then stream cursor, then durable cursor.

Determines the starting cursor for a chain-topic, preferring pending replay, then stream cursor, then durable cursor.

Value parameters

chainTopic

the chain-topic pair

Attributes

Returns

the cursor to start reading from, or None for origin

Source
ProducerSession.scala

Merges additional durable cursor entries into this state.

Merges additional durable cursor entries into this state.

Value parameters

cursor

the cursor entries to merge

Attributes

Returns

the updated state

Source
ProducerSession.scala
def withReplay(chainTopic: ChainTopic, cursor: Option[CursorToken]): GossipProducerSessionState

Marks a chain-topic for replay from the given cursor.

Marks a chain-topic for replay from the given cursor.

Value parameters

chainTopic

the chain-topic pair to replay

cursor

the cursor to replay from, or None for origin

Attributes

Returns

the updated state

Source
ProducerSession.scala

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product