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
public class StreamServiceImpl extends DefaultComponent implements StreamService
- Since:
- 9.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classStreamServiceImpl.ComponentsLifeCycleListener
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_CODECprotected BooleanisStreamProcessingDisabledprotected LogManagerlogManagerstatic StringNUXEO_STREAM_DIR_PROPstatic StringNUXEO_STREAM_RET_DURATION_PROPprotected Map<String,StreamProcessor>processorsstatic StringSTREAM_PROCESSING_ENABLEDprotected StreamManagerstreamManagerprotected static StringXP_LOG_CONFIGprotected static StringXP_STREAM_PROCESSOR-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description StreamServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected LogConfigcreateChronicleLogConfig(LogConfigDescriptor desc)protected LogConfigcreateKafkaLogConfig(LogConfigDescriptor desc)protected voidcreateLogIfNotExists(LogConfigDescriptor config)intgetApplicationStartedOrder()The component notification order forComponent.applicationStarted(org.nuxeo.runtime.model.ComponentContext).protected PathgetChroniclePath(String basePath)protected StringgetChronicleRetention(String retention)protected List<LogConfig>getLogConfigs()LogManagergetLogManager()protected SettingsgetSettings(StreamProcessorDescriptor descriptor)StreamManagergetStreamManager()protected voidinitProcessor(StreamProcessorDescriptor descriptor)protected booleanisProcessingDisabled()voidstart(ComponentContext context)Start the component.protected voidstartProcessors()voidstop(ComponentContext context)Stop the component.voidstopProcessors()-
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.model.Component
applicationStarted
-
Methods inherited from interface org.nuxeo.runtime.stream.StreamService
getLogManager, getStreamManager
-
-
-
-
Field Detail
-
NUXEO_STREAM_DIR_PROP
public static final String NUXEO_STREAM_DIR_PROP
- See Also:
- Constant Field Values
-
NUXEO_STREAM_RET_DURATION_PROP
public static final String NUXEO_STREAM_RET_DURATION_PROP
- See Also:
- Constant Field Values
-
DEFAULT_CODEC
public static final String DEFAULT_CODEC
- See Also:
- Constant Field Values
-
XP_LOG_CONFIG
protected static final String XP_LOG_CONFIG
- See Also:
- Constant Field Values
-
XP_STREAM_PROCESSOR
protected static final String XP_STREAM_PROCESSOR
- See Also:
- Constant Field Values
-
logManager
protected LogManager logManager
-
streamManager
protected StreamManager streamManager
-
processors
protected final Map<String,StreamProcessor> processors
-
STREAM_PROCESSING_ENABLED
public static final String STREAM_PROCESSING_ENABLED
- Since:
- 11.2
- See Also:
- Constant Field Values
-
isStreamProcessingDisabled
protected Boolean isStreamProcessingDisabled
-
-
Constructor Detail
-
StreamServiceImpl
public StreamServiceImpl()
-
-
Method Detail
-
getApplicationStartedOrder
public int getApplicationStartedOrder()
Description copied from interface:ComponentThe component notification order forComponent.applicationStarted(org.nuxeo.runtime.model.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
-
getLogManager
public LogManager getLogManager()
- Specified by:
getLogManagerin interfaceStreamService
-
getStreamManager
public StreamManager getStreamManager()
- Specified by:
getStreamManagerin interfaceStreamService
-
getChronicleRetention
protected String getChronicleRetention(String retention)
-
getChroniclePath
protected Path getChroniclePath(String basePath)
-
createLogIfNotExists
protected void createLogIfNotExists(LogConfigDescriptor config)
-
start
public void start(ComponentContext context)
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
-
getLogConfigs
protected List<LogConfig> getLogConfigs()
-
createKafkaLogConfig
protected LogConfig createKafkaLogConfig(LogConfigDescriptor desc)
-
createChronicleLogConfig
protected LogConfig createChronicleLogConfig(LogConfigDescriptor desc)
-
initProcessor
protected void initProcessor(StreamProcessorDescriptor descriptor)
-
getSettings
protected Settings getSettings(StreamProcessorDescriptor descriptor)
-
stop
public void stop(ComponentContext context) throws InterruptedException
Description copied from interface:ComponentStop the component.- Specified by:
stopin interfaceComponent- Overrides:
stopin classDefaultComponent- Throws:
InterruptedException
-
startProcessors
protected void startProcessors()
-
stopProcessors
public void stopProcessors()
- Specified by:
stopProcessorsin interfaceStreamService
-
isProcessingDisabled
protected boolean isProcessingDisabled()
-
-