Class LogStreamManager
java.lang.Object
org.nuxeo.lib.stream.computation.log.LogStreamManager
- All Implemented Interfaces:
AutoCloseable
,StreamManager
StreamManager based on a LogManager
- Since:
- 11.1
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Map<Name,
RecordFilterChain> protected final LogManager
static final String
protected final Map<String,
StreamProcessor> static final String
-
Constructor Summary
ConstructorDescriptionLogStreamManager
(String nodeId, LogManager logManager) LogStreamManager
(LogManager logManager) -
Method Summary
Modifier and TypeMethodDescriptionAppends a record to a processor's source stream.void
close()
createStreamProcessor
(String processorName) Creates a registered processor without starting it.createTailer
(Name computationName, Collection<LogPartition> streamPartitions) getCodec
(Collection<Name> streams) protected String
getProcessor
(String processorName) Gets a processor.Gets a set of processor names.protected void
initAppenders
(Collection<String> streams, Settings settings) protected void
initInternalStream
(Name stream) protected void
protected void
initStream
(String streamName, Settings settings) protected void
initStreams
(Topology topology, Settings settings) void
Registers a processor and initializes the underlying streams, this is needed before creating a processor or appending record in source streams.void
Registers some source Streams without any processors.protected void
registerFilters
(Collection<String> streams, Settings settings) subscribe
(Name computationName, Collection<Name> streams, RebalanceListener listener) boolean
Deprecated.boolean
supportSubscribe
(Name stream) Returnstrue
if thesubscribe(org.nuxeo.lib.stream.log.Name, java.util.Collection<org.nuxeo.lib.stream.log.Name>, org.nuxeo.lib.stream.log.RebalanceListener)
method is supported for the specific stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.lib.stream.computation.StreamManager
registerAndCreateProcessor
-
Field Details
-
PROCESSORS_STREAM
- See Also:
-
METRICS_STREAM
- See Also:
-
INTERNAL_CODEC
-
logManager
-
systemMetadata
-
processors
-
topologies
-
settings
-
filters
-
streams
-
-
Constructor Details
-
LogStreamManager
-
LogStreamManager
-
-
Method Details
-
initInternalStreams
protected void initInternalStreams() -
initInternalStream
-
register
Description copied from interface:StreamManager
Registers a processor and initializes the underlying streams, this is needed before creating a processor or appending record in source streams.- Specified by:
register
in interfaceStreamManager
-
register
Description copied from interface:StreamManager
Registers some source Streams without any processors.- Specified by:
register
in interfaceStreamManager
-
createStreamProcessor
Description copied from interface:StreamManager
Creates a registered processor without starting it.- Specified by:
createStreamProcessor
in interfaceStreamManager
-
getNodeId
-
getLogManager
-
append
Description copied from interface:StreamManager
Appends a record to a processor's source stream.- Specified by:
append
in interfaceStreamManager
-
getProcessorNames
Description copied from interface:StreamManager
Gets a set of processor names.- Specified by:
getProcessorNames
in interfaceStreamManager
-
getProcessor
Description copied from interface:StreamManager
Gets a processor.- Specified by:
getProcessor
in interfaceStreamManager
- Returns:
- null if the processor doesn't exist
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceStreamManager
-
supportSubscribe
Returnstrue
if thesubscribe(org.nuxeo.lib.stream.log.Name, java.util.Collection<org.nuxeo.lib.stream.log.Name>, org.nuxeo.lib.stream.log.RebalanceListener)
method is supported for the specific stream.- Since:
- 2021.34
-
supportSubscribe
public boolean supportSubscribe()Deprecated.since 2021.34 usesupportSubscribe(Name)
insteadReturnstrue
if thesubscribe(org.nuxeo.lib.stream.log.Name, java.util.Collection<org.nuxeo.lib.stream.log.Name>, org.nuxeo.lib.stream.log.RebalanceListener)
method is supported. Now deprecated because some implementations support subscribe only on specific streams. -
subscribe
public LogTailer<Record> subscribe(Name computationName, Collection<Name> streams, RebalanceListener listener) -
createTailer
public LogTailer<Record> createTailer(Name computationName, Collection<LogPartition> streamPartitions) -
getFilter
-
getCodec
-
initStreams
-
initStream
-
initAppenders
-
registerFilters
-
supportSubscribe(Name)
instead