Class AbstractMergePointsWorker<T>

All Implemented Interfaces:
MergePointsWorker
Direct Known Subclasses:
ForceMergePointsWorker, SafeMergePointsWorker

public abstract class AbstractMergePointsWorker<T> extends AbstractImmediateWorker implements MergePointsWorker
  • Field Details

    • parent

      protected final InfluxConnector parent
    • writeParameters

      protected final com.influxdb.client.write.WriteParameters writeParameters
  • Constructor Details

    • AbstractMergePointsWorker

      public AbstractMergePointsWorker(InfluxConnector parent, String name, com.influxdb.client.write.WriteParameters writeParameters, Consumer<com.influxdb.exceptions.BadRequestException> onWriteError)
  • Method Details

    • activate

      public void activate()
      Description copied from interface: MergePointsWorker
      Activates the worker.
      Specified by:
      activate in interface MergePointsWorker
    • forever

      protected void forever() throws InterruptedException
      Description copied from class: AbstractWorker
      This method is called in a loop forever until the Thread gets interrupted.
      Specified by:
      forever in class AbstractImmediateWorker
      Throws:
      InterruptedException
    • writePoints

      protected abstract List<com.influxdb.client.write.Point> writePoints(List<T> points)
    • onWriteError

      protected void onWriteError(Throwable t, List<T> points)
    • offer

      public boolean offer(T point)
      Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions, returning true upon success and false if no space is currently available.
      Parameters:
      point - the point to add
      Returns:
      true if the point was added to this queue, else false
    • debugLog

      public String debugLog()
      Description copied from interface: MergePointsWorker
      Simple debug log string.
      Specified by:
      debugLog in interface MergePointsWorker
      Returns:
      the debug string