Package org.nuxeo.lib.stream.computation
Class Settings
java.lang.Object
org.nuxeo.lib.stream.computation.Settings
Settings defines stream's partitions and computation's concurrency and policy.
- Since:
- 9.3
-
Field Summary
Modifier and TypeFieldDescriptionprotected final int
protected final boolean
protected final RecordFilterChain
protected final int
protected final ComputationPolicy
protected final Map<Name,
RecordFilterChain> protected final Map<Name,
ComputationPolicy> -
Constructor Summary
ConstructorDescriptionSettings
(int defaultConcurrency, int defaultPartitions) Default concurrency and partition to use if not specified explicitly.Default concurrency and partition to use if not specified explicitly.Settings
(int defaultConcurrency, int defaultPartitions, Codec<Record> defaultCodec, ComputationPolicy defaultPolicy) Settings
(int defaultConcurrency, int defaultPartitions, Codec<Record> defaultCodec, ComputationPolicy defaultPolicy, RecordFilterChain defaultFilter) Settings
(int defaultConcurrency, int defaultPartitions, Codec<Record> defaultCodec, ComputationPolicy defaultPolicy, RecordFilterChain defaultFilter, boolean defaultExternal) Settings
(int defaultConcurrency, int defaultPartitions, ComputationPolicy defaultPolicy) -
Method Summary
Modifier and TypeMethodDescriptionaddFilter
(String streamName, RecordFilter filter) Add a filteraddFilter
(Name streamName, RecordFilter filter) Add a filterGets the codec for a stream.Gets the codec for a stream.int
getConcurrency
(String computationName) int
getConcurrency
(Name computationName) getFilterChain
(String streamName) Gets the filter chain for a stream.getFilterChain
(Name streamName) Gets the filter chain for a stream.int
getPartitions
(String streamName) int
getPartitions
(Name streamName) Gets the policy for a computation.Gets the policy for a computation.boolean
isExternal
(Name streamName) Sets the codec for a stream.Sets the codec for a stream.setConcurrency
(String computationName, int concurrency) Sets the computation thread pool size.setConcurrency
(Name computationName, int concurrency) setExternal
(Name streamName, boolean external) setPartitions
(String streamName, int partitions) setPartitions
(Name streamName, int partitions) Sets the number of partitions for a stream.setPolicy
(String computationName, ComputationPolicy policy) Sets the policy for a computation, when using default as computationName this sets the default policy for all computations in the processor.setPolicy
(Name computationName, ComputationPolicy policy) Sets the policy for a computation, when using default as computationName this sets the default policy for all computations in the processor.
-
Field Details
-
defaultPartitions
protected final int defaultPartitions -
partitions
-
defaultCodec
-
codecs
-
defaultFilter
-
filters
-
externals
-
defaultExternal
protected final boolean defaultExternal -
defaultConcurrency
protected final int defaultConcurrency -
concurrencies
-
defaultPolicy
-
policies
-
-
Constructor Details
-
Settings
public Settings(int defaultConcurrency, int defaultPartitions) Default concurrency and partition to use if not specified explicitly. -
Settings
Default concurrency and partition to use if not specified explicitly. -
Settings
-
Settings
public Settings(int defaultConcurrency, int defaultPartitions, Codec<Record> defaultCodec, ComputationPolicy defaultPolicy) -
Settings
public Settings(int defaultConcurrency, int defaultPartitions, Codec<Record> defaultCodec, ComputationPolicy defaultPolicy, RecordFilterChain defaultFilter) -
Settings
public Settings(int defaultConcurrency, int defaultPartitions, Codec<Record> defaultCodec, ComputationPolicy defaultPolicy, RecordFilterChain defaultFilter, boolean defaultExternal)
-
-
Method Details
-
setConcurrency
Sets the computation thread pool size. -
setConcurrency
-
getConcurrency
-
getConcurrency
-
setPartitions
Sets the number of partitions for a stream. -
setPartitions
-
getPartitions
-
getPartitions
-
setExternal
-
isExternal
-
setCodec
Sets the codec for a stream.- Since:
- 11.1
-
setCodec
Sets the codec for a stream.- Since:
- 10.2
-
getCodec
Gets the codec for a stream.- Since:
- 10.2
-
getCodec
Gets the codec for a stream.- Since:
- 11.1
-
setPolicy
Sets the policy for a computation, when using default as computationName this sets the default policy for all computations in the processor.- Since:
- 11.1
-
setPolicy
Sets the policy for a computation, when using default as computationName this sets the default policy for all computations in the processor.- Since:
- 10.3
-
getPolicy
Gets the policy for a computation.- Since:
- 11.1
-
getPolicy
Gets the policy for a computation.- Since:
- 10.3
-
addFilter
Add a filter- Since:
- 11.1
-
addFilter
Add a filter- Since:
- 11.1
-
getFilterChain
Gets the filter chain for a stream.- Since:
- 11.1
-
getFilterChain
Gets the filter chain for a stream.- Since:
- 11.1
-