Class TransientPendingSubscriptionState

java.lang.Object
io.camunda.zeebe.engine.state.message.TransientPendingSubscriptionState

public final class TransientPendingSubscriptionState extends Object
This class is used 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.