Class TDBatchConsumer

    • Constructor Detail

      • TDBatchConsumer

        @Deprecated
        protected TDBatchConsumer​(String serverUrl,
                                  String appId,
                                  boolean isThrowException)
                           throws URISyntaxException
        Deprecated.
        Construct BatchConsumer
        Parameters:
        serverUrl - serverUrl
        appId - APP ID
        isThrowException - throw exception or not
        Throws:
        URISyntaxException - exception
      • TDBatchConsumer

        @Deprecated
        protected TDBatchConsumer​(String serverUrl,
                                  String appId,
                                  int batchSize,
                                  int timeout,
                                  boolean autoFlush,
                                  int interval)
                           throws URISyntaxException
        Deprecated.
        Construct BatchConsumer
        Parameters:
        serverUrl - serverUrl
        appId - APP ID
        batchSize - flush event count each time
        timeout - http timeout (Unit: mill second)
        autoFlush - is auto flush or not
        interval - auto flush spacing (Unit: second)
        Throws:
        URISyntaxException - exception
      • TDBatchConsumer

        @Deprecated
        protected TDBatchConsumer​(String serverUrl,
                                  String appId,
                                  int batchSize,
                                  int timeout,
                                  boolean autoFlush,
                                  int interval,
                                  String compress)
                           throws URISyntaxException
        Deprecated.
        Construct BatchConsumer
        Parameters:
        serverUrl - serverUrl
        appId - APP ID
        batchSize - flush event count each time
        timeout - http timeout (Unit: mill second)
        autoFlush - is auto flush or not
        interval - auto flush spacing (Unit: second)
        compress - compress type
        Throws:
        URISyntaxException - exception
      • TDBatchConsumer

        protected TDBatchConsumer​(String serverUrl,
                                  String appId,
                                  int batchSize,
                                  int timeout,
                                  boolean autoFlush,
                                  int interval,
                                  String compress,
                                  int maxCacheSize,
                                  boolean isThrowException)
                           throws URISyntaxException
        Construct BatchConsumer
        Parameters:
        serverUrl - serverUrl
        appId - APP ID
        batchSize - flush event count each time
        timeout - http timeout (Unit: mill second)
        autoFlush - is auto flush or not
        interval - auto flush spacing (Unit: second)
        compress - compress type
        maxCacheSize - max buffer count
        isThrowException - is throw exception or not
        Throws:
        URISyntaxException - exception
    • Method Detail

      • flush

        public void flush()
        Description copied from interface: ITDConsumer
        upload all data in buffer immediately
        Specified by:
        flush in interface ITDConsumer
      • flushOnce

        public void flushOnce()
        Flush data once.
      • httpSending

        public void httpSending​(String data,
                                int dataSize)
        Send data
        Parameters:
        data - Event data
        dataSize - Data size
      • close

        public void close()
        Description copied from interface: ITDConsumer
        close consumer
        Specified by:
        close in interface ITDConsumer