Class DbProcessMessageSubscriptionState
java.lang.Object
io.camunda.zeebe.engine.state.message.DbProcessMessageSubscriptionState
- All Implemented Interfaces:
PendingProcessMessageSubscriptionState
,ProcessMessageSubscriptionState
,MutableProcessMessageSubscriptionState
,StreamProcessorLifecycleAware
public final class DbProcessMessageSubscriptionState
extends Object
implements MutableProcessMessageSubscriptionState, PendingProcessMessageSubscriptionState, StreamProcessorLifecycleAware
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.zeebe.engine.state.immutable.ProcessMessageSubscriptionState
ProcessMessageSubscriptionState.ProcessMessageSubscriptionVisitor
-
Constructor Summary
ConstructorsConstructorDescriptionDbProcessMessageSubscriptionState
(ZeebeDb<ZbColumnFamilies> zeebeDb, TransactionContext transactionContext, TransientPendingSubscriptionState transientProcessMessageSubscriptionState) -
Method Summary
Modifier and TypeMethodDescriptionboolean
existSubscriptionForElementInstance
(long elementInstanceKey, org.agrona.DirectBuffer messageName, String tenantId) getSubscription
(long elementInstanceKey, org.agrona.DirectBuffer messageName, String tenantId) void
void
onSent
(ProcessMessageSubscriptionRecord record, long timestampMs) Should be called when a pending subscription is sent out.void
put
(long key, ProcessMessageSubscriptionRecord record) boolean
void
void
void
void
visitElementSubscriptions
(long elementInstanceKey, ProcessMessageSubscriptionState.ProcessMessageSubscriptionVisitor visitor) 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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.camunda.zeebe.stream.api.StreamProcessorLifecycleAware
onClose, onFailed, onPaused, onResumed
-
Constructor Details
-
DbProcessMessageSubscriptionState
public DbProcessMessageSubscriptionState(ZeebeDb<ZbColumnFamilies> zeebeDb, TransactionContext transactionContext, TransientPendingSubscriptionState transientProcessMessageSubscriptionState)
-
-
Method Details
-
onRecovered
- Specified by:
onRecovered
in interfaceStreamProcessorLifecycleAware
-
put
- Specified by:
put
in interfaceMutableProcessMessageSubscriptionState
-
updateToOpeningState
- Specified by:
updateToOpeningState
in interfaceMutableProcessMessageSubscriptionState
-
updateToOpenedState
- Specified by:
updateToOpenedState
in interfaceMutableProcessMessageSubscriptionState
-
updateToClosingState
- Specified by:
updateToClosingState
in interfaceMutableProcessMessageSubscriptionState
-
remove
public boolean remove(long elementInstanceKey, org.agrona.DirectBuffer messageName, String tenantId) - Specified by:
remove
in interfaceMutableProcessMessageSubscriptionState
-
getSubscription
public ProcessMessageSubscription getSubscription(long elementInstanceKey, org.agrona.DirectBuffer messageName, String tenantId) - Specified by:
getSubscription
in interfaceProcessMessageSubscriptionState
-
visitElementSubscriptions
public void visitElementSubscriptions(long elementInstanceKey, ProcessMessageSubscriptionState.ProcessMessageSubscriptionVisitor visitor) - Specified by:
visitElementSubscriptions
in interfaceProcessMessageSubscriptionState
-
existSubscriptionForElementInstance
public boolean existSubscriptionForElementInstance(long elementInstanceKey, org.agrona.DirectBuffer messageName, String tenantId) - Specified by:
existSubscriptionForElementInstance
in interfaceProcessMessageSubscriptionState
-
visitPending
public void visitPending(long deadline, ProcessMessageSubscriptionState.ProcessMessageSubscriptionVisitor visitor) Description copied from interface:PendingProcessMessageSubscriptionState
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.- Specified by:
visitPending
in interfacePendingProcessMessageSubscriptionState
-
onSent
Description copied from interface:PendingProcessMessageSubscriptionState
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 byPendingProcessMessageSubscriptionState.visitPending(long, ProcessMessageSubscriptionVisitor)
.- Specified by:
onSent
in interfacePendingProcessMessageSubscriptionState
-