Class TransientPendingSubscriptionState
java.lang.Object
io.camunda.zeebe.engine.state.message.TransientPendingSubscriptionState
This class is used by
This class is thread safe. It's intended use is that one thread is adding, removing and updating entries while another thread is "observing" the entries by calling
The iterable returned by
DbProcessMessageSubscriptionState
and DbMessageSubscriptionState
to keep track of pending (process) message subscriptions. PendingSubscriptions
are added with a last sent time. The time can be
updated with update(PendingSubscription, long)
. Pending subscriptions are retrieved with
entriesBefore(long)
, ordered by the last sent time. This class is thread safe. It's intended use is that one thread is adding, removing and updating entries while another thread is "observing" the entries by calling
entriesBefore(long)
.
The iterable returned by
entriesBefore(long)
may return outdated entries (i.e. entries
which last sent time was updated so that those entries should not have been returned) and already
removed entries. For the intended use, this is not a problem.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(TransientPendingSubscriptionState.PendingSubscription pendingSubscription, long lastSentTime) void
remove
(TransientPendingSubscriptionState.PendingSubscription pendingSubscription) void
update
(TransientPendingSubscriptionState.PendingSubscription pendingSubscription, long lastSentTime)
-
Constructor Details
-
TransientPendingSubscriptionState
public TransientPendingSubscriptionState()
-
-
Method Details
-
add
public void add(TransientPendingSubscriptionState.PendingSubscription pendingSubscription, long lastSentTime) -
update
public void update(TransientPendingSubscriptionState.PendingSubscription pendingSubscription, long lastSentTime) -
remove
-