Package org.nuxeo.runtime.stream
Class StreamServiceImpl
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.runtime.stream.StreamServiceImpl
- All Implemented Interfaces:
Adaptable
,Component
,Extensible
,TimestampedService
,StreamService
- Since:
- 9.3
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected Boolean
protected LogManager
static final String
protected StreamManager
protected static final String
protected static final String
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected LogConfig
protected void
protected LogConfig
int
The component notification order forComponent.start(ComponentContext)
.protected String
protected Settings
getSettings
(StreamProcessorDescriptor descriptor) protected void
initProcessor
(StreamProcessorDescriptor descriptor) protected boolean
boolean
restartComputation
(Name computation) Restart the computation thread pool.boolean
setComputationPositionAfterDate
(Name computation, Name stream, Instant after) Moving computation position after a date.boolean
setComputationPositionToBeginning
(Name computation, Name stream) Moving computation position to the beginning of stream.boolean
setComputationPositionToEnd
(Name computation, Name stream) Moving computation position to the end of stream.boolean
setComputationPositionToOffset
(Name computation, Name stream, int partition, long offset) Moving computation position to a specific offset for a partition.void
start
(ComponentContext context) Start the component.boolean
startProcessor
(String processorName) Starts a registered Processor.protected void
void
stop
(ComponentContext context) Stop the component.boolean
stopComputation
(Name computation) Stop computation thread pool immediately.boolean
stopProcessor
(String processorName) Stop a running processor.void
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, unregister, unregisterContribution, unregisterExtension
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.runtime.stream.StreamService
getLogManager, getStreamManager
-
Field Details
-
DEFAULT_CODEC
- See Also:
-
XP_LOG_CONFIG
- See Also:
-
XP_STREAM_PROCESSOR
- See Also:
-
logManager
-
streamManager
-
STREAM_PROCESSING_ENABLED
- Since:
- 11.2
- See Also:
-
isStreamProcessingDisabled
-
-
Constructor Details
-
StreamServiceImpl
public StreamServiceImpl()
-
-
Method Details
-
getApplicationStartedOrder
public int getApplicationStartedOrder()Description copied from interface:Component
The 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:
getApplicationStartedOrder
in interfaceComponent
- Returns:
- the order, 1000 by default
-
getLogManager
- Specified by:
getLogManager
in interfaceStreamService
-
getStreamManager
- Specified by:
getStreamManager
in interfaceStreamService
-
createLogIfNotExists
-
start
Description copied from interface:Component
Start the component. This method is called after all the components were resolved and activated- Specified by:
start
in interfaceComponent
- Overrides:
start
in classDefaultComponent
-
getNodeId
-
getLogConfigs
-
createMemLogConfig
-
createKafkaLogConfig
-
initProcessor
-
getSettings
-
stop
Description copied from interface:Component
Stop the component.- Specified by:
stop
in interfaceComponent
- Overrides:
stop
in classDefaultComponent
- Throws:
InterruptedException
-
startProcessors
protected void startProcessors() -
stopProcessors
public void stopProcessors()- Specified by:
stopProcessors
in interfaceStreamService
-
startProcessor
Description copied from interface:StreamService
Starts a registered Processor. Returns true if the processor has been started.- Specified by:
startProcessor
in interfaceStreamService
-
stopProcessor
Description copied from interface:StreamService
Stop a running processor. Returns true if the processor has been stopped.- Specified by:
stopProcessor
in interfaceStreamService
-
stopComputation
Description copied from interface:StreamService
Stop computation thread pool immediately.- Specified by:
stopComputation
in interfaceStreamService
-
restartComputation
Description copied from interface:StreamService
Restart the computation thread pool. Do nothing if the computation thread pool is already started.- Specified by:
restartComputation
in interfaceStreamService
-
setComputationPositionToEnd
Description copied from interface:StreamService
Moving computation position to the end of stream. The computation thread pool must be stopped usingStreamService.stopComputation(Name)
before changing its position.- Specified by:
setComputationPositionToEnd
in interfaceStreamService
-
setComputationPositionToBeginning
Description copied from interface:StreamService
Moving computation position to the beginning of stream. The computation thread pool must be stopped usingStreamService.stopComputation(Name)
before changing its position.- Specified by:
setComputationPositionToBeginning
in interfaceStreamService
-
setComputationPositionToOffset
public boolean setComputationPositionToOffset(Name computation, Name stream, int partition, long offset) Description copied from interface:StreamService
Moving computation position to a specific offset for a partition. The computation thread pool must be stopped usingStreamService.stopComputation(Name)
before changing its position.- Specified by:
setComputationPositionToOffset
in interfaceStreamService
-
setComputationPositionAfterDate
Description copied from interface:StreamService
Moving computation position after a date. The computation thread pool must be stopped usingStreamService.stopComputation(Name)
before changing its position.- Specified by:
setComputationPositionAfterDate
in interfaceStreamService
-
isProcessingDisabled
protected boolean isProcessingDisabled()
-