Interface PendingProcessMessageSubscriptionState
- All Known Implementing Classes:
DbProcessMessageSubscriptionState
public interface PendingProcessMessageSubscriptionState
Captures the transient (in-memory) state for a ProcessMessageSubscription. This is to track the
state of the communication between the process instance partition and the message partition
during opening or closing of a process message subscription. This state is not persisted to disk
and needs to be recovered after restart
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onSent
(ProcessMessageSubscriptionRecord record, long timestampMs) Should be called when a pending subscription is sent out.void
visitPending
(long deadline, ProcessMessageSubscriptionState.ProcessMessageSubscriptionVisitor visitor) Visits all pending process message subscriptions where a command hasn't been sent out since a given deadline.
-
Method Details
-
visitPending
void visitPending(long deadline, ProcessMessageSubscriptionState.ProcessMessageSubscriptionVisitor visitor) Visits all pending process message subscriptions where a command hasn't been sent out since a given deadline. The visitor is called for each subscription, from the oldest to the newest. -
onSent
Should be called when a pending subscription is sent out. This is used to keep track of the last time a command was sent out for a subscription. Freshly sent-out subscriptions are not visited byvisitPending(long, ProcessMessageSubscriptionVisitor)
.
-