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 TypeMethodDescriptionbooleanexistSubscriptionForElementInstance(long elementInstanceKey, org.agrona.DirectBuffer messageName, String tenantId) getSubscription(long elementInstanceKey, org.agrona.DirectBuffer messageName, String tenantId) voidvoidonSent(ProcessMessageSubscriptionRecord record, long timestampMs) Should be called when a pending subscription is sent out.voidput(long key, ProcessMessageSubscriptionRecord record) booleanvoidvoidvoidvoidvisitElementSubscriptions(long elementInstanceKey, ProcessMessageSubscriptionState.ProcessMessageSubscriptionVisitor visitor) voidvisitPending(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, waitMethods 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:
onRecoveredin interfaceStreamProcessorLifecycleAware
-
put
- Specified by:
putin interfaceMutableProcessMessageSubscriptionState
-
updateToOpeningState
- Specified by:
updateToOpeningStatein interfaceMutableProcessMessageSubscriptionState
-
updateToOpenedState
- Specified by:
updateToOpenedStatein interfaceMutableProcessMessageSubscriptionState
-
updateToClosingState
- Specified by:
updateToClosingStatein interfaceMutableProcessMessageSubscriptionState
-
remove
public boolean remove(long elementInstanceKey, org.agrona.DirectBuffer messageName, String tenantId) - Specified by:
removein interfaceMutableProcessMessageSubscriptionState
-
getSubscription
public ProcessMessageSubscription getSubscription(long elementInstanceKey, org.agrona.DirectBuffer messageName, String tenantId) - Specified by:
getSubscriptionin interfaceProcessMessageSubscriptionState
-
visitElementSubscriptions
public void visitElementSubscriptions(long elementInstanceKey, ProcessMessageSubscriptionState.ProcessMessageSubscriptionVisitor visitor) - Specified by:
visitElementSubscriptionsin interfaceProcessMessageSubscriptionState
-
existSubscriptionForElementInstance
public boolean existSubscriptionForElementInstance(long elementInstanceKey, org.agrona.DirectBuffer messageName, String tenantId) - Specified by:
existSubscriptionForElementInstancein interfaceProcessMessageSubscriptionState
-
visitPending
public void visitPending(long deadline, ProcessMessageSubscriptionState.ProcessMessageSubscriptionVisitor visitor) Description copied from interface:PendingProcessMessageSubscriptionStateVisits 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:
visitPendingin interfacePendingProcessMessageSubscriptionState
-
onSent
Description copied from interface:PendingProcessMessageSubscriptionStateShould 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:
onSentin interfacePendingProcessMessageSubscriptionState
-