Package org.nuxeo.runtime.pubsub
Class ClusterActionServiceImpl
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.runtime.pubsub.ClusterActionServiceImpl
- All Implemented Interfaces:
Adaptable,Component,Extensible,ClusterActionService,TimestampedService
- Since:
- 2023.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassPubSub to propagate an action to all nodes in the cluster. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<String,Consumer<ClusterActionMessage>> static final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(ComponentContext context) Activates the component.voidexecuteAction(ClusterActionMessage message) Propagate an action to all others nodes in the cluster.protected Consumer<ClusterActionMessage>intThe component notification order forComponent.start(ComponentContext).voidregisterAction(String action, Consumer<ClusterActionMessage> consumer) Registers an action for a requested propagationvoidstart(ComponentContext context) Start the component.voidstop(ComponentContext context) Stop the component.Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, unregister, unregisterContribution, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.pubsub.ClusterActionService
executeAction
-
Field Details
-
STREAM_START_PROCESSOR_ACTION
- See Also:
-
STREAM_STOP_PROCESSOR_ACTION
- See Also:
-
STREAM_START_CONSUMER_ACTION
- See Also:
-
STREAM_STOP_CONSUMER_ACTION
- See Also:
-
clusterActions
-
clusterActionPubSub
-
-
Constructor Details
-
ClusterActionServiceImpl
public ClusterActionServiceImpl()
-
-
Method Details
-
activate
Description copied from interface:ComponentActivates the component.This method is called by the runtime when a component is activated.
- Specified by:
activatein interfaceComponent- Overrides:
activatein classDefaultComponent- Parameters:
context- the runtime context
-
start
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
startin interfaceComponent- Overrides:
startin classDefaultComponent
-
stop
Description copied from interface:ComponentStop the component.- Specified by:
stopin interfaceComponent- Overrides:
stopin classDefaultComponent- Throws:
InterruptedException
-
getApplicationStartedOrder
public int getApplicationStartedOrder()Description copied from interface:ComponentThe component notification order forComponent.start(ComponentContext).Components are notified in increasing order. Order 1000 is the default order for components that don't care. Order 100 is the repository initialization.
- Specified by:
getApplicationStartedOrderin interfaceComponent- Returns:
- the order, 1000 by default
-
registerAction
Description copied from interface:ClusterActionServiceRegisters an action for a requested propagation- Specified by:
registerActionin interfaceClusterActionService
-
getAction
-
executeAction
Description copied from interface:ClusterActionServicePropagate an action to all others nodes in the cluster.- Specified by:
executeActionin interfaceClusterActionService
-