Class TDBatchConsumer.Config

  • Enclosing class:
    TDBatchConsumer

    public static class TDBatchConsumer.Config
    extends Object
    BatchConsumer config
    • Field Detail

      • batchSize

        protected int batchSize
        Batch size
      • interval

        protected int interval
        Batch time interval
      • compress

        protected String compress
        Http compress type. default is "gzip"
      • timeout

        protected int timeout
        Http timeout
      • autoFlush

        protected boolean autoFlush
        Enable auto flush
      • maxCacheSize

        protected int maxCacheSize
        Max cache size
      • isThrowException

        protected boolean isThrowException
        Is throw exception
    • Constructor Detail

      • Config

        public Config()
        Construct batch consumer config
    • Method Detail

      • setBatchSize

        public void setBatchSize​(int batchSize)
        Parameters:
        batchSize - flush event count each time
      • setInterval

        public void setInterval​(int interval)
        Parameters:
        interval - auto flush spacing (Unit: second)
      • setCompress

        public void setCompress​(String compress)
        Parameters:
        compress - compress type
      • setTimeout

        public void setTimeout​(int timeout)
        network timeout
        Parameters:
        timeout - millSecond
      • setAutoFlush

        public void setAutoFlush​(boolean autoFlush)
        Whether to allow automatic flushing
        Parameters:
        autoFlush - enable or not
      • setMaxCacheSize

        public void setMaxCacheSize​(int maxCacheSize)
        max cache buffer size
        Parameters:
        maxCacheSize - number
      • setThrowException

        public void setThrowException​(boolean isThrowException)
        Whether to throw exception
        Parameters:
        isThrowException - enable or not