Class Settings


  • public class Settings
    extends Object
    Settings defines stream's partitions and computation's concurrency and policy.
    Since:
    9.3
    • Constructor Detail

      • Settings

        public Settings​(int defaultConcurrency,
                        int defaultPartitions)
        Default concurrency and partition to use if not specified explicitly.
      • Settings

        public Settings​(int defaultConcurrency,
                        int defaultPartitions,
                        Codec<Record> defaultCodec)
        Default concurrency and partition to use if not specified explicitly.
      • Settings

        public Settings​(int defaultConcurrency,
                        int defaultPartitions,
                        ComputationPolicy defaultPolicy)
      • Settings

        public Settings​(int defaultConcurrency,
                        int defaultPartitions,
                        Codec<Record> defaultCodec,
                        ComputationPolicy defaultPolicy)
    • Method Detail

      • setConcurrency

        public Settings setConcurrency​(String computationName,
                                       int concurrency)
        Sets the computation thread pool size.
      • setConcurrency

        public Settings setConcurrency​(Name computationName,
                                       int concurrency)
      • getConcurrency

        public int getConcurrency​(String computationName)
      • getConcurrency

        public int getConcurrency​(Name computationName)
      • setPartitions

        public Settings setPartitions​(Name streamName,
                                      int partitions)
        Sets the number of partitions for a stream.
      • setPartitions

        public Settings setPartitions​(String streamName,
                                      int partitions)
      • getPartitions

        public int getPartitions​(Name streamName)
      • getPartitions

        public int getPartitions​(String streamName)
      • setExternal

        public Settings setExternal​(Name streamName,
                                    boolean external)
      • isExternal

        public boolean isExternal​(Name streamName)
      • setCodec

        public Settings setCodec​(Name streamName,
                                 Codec<Record> codec)
        Sets the codec for a stream.
        Since:
        11.1
      • getCodec

        public Codec<Record> getCodec​(String streamName)
        Gets the codec for a stream.
        Since:
        10.2
      • getCodec

        public Codec<Record> getCodec​(Name streamName)
        Gets the codec for a stream.
        Since:
        11.1
      • setPolicy

        public Settings 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.
        Since:
        11.1
      • setPolicy

        public Settings 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.
        Since:
        10.3
      • getPolicy

        public ComputationPolicy getPolicy​(Name computationName)
        Gets the policy for a computation.
        Since:
        11.1
      • getPolicy

        public ComputationPolicy getPolicy​(String computationName)
        Gets the policy for a computation.
        Since:
        10.3
      • getFilterChain

        public RecordFilterChain getFilterChain​(Name streamName)
        Gets the filter chain for a stream.
        Since:
        11.1
      • getFilterChain

        public RecordFilterChain getFilterChain​(String streamName)
        Gets the filter chain for a stream.
        Since:
        11.1