Class LongPollService

  • All Implemented Interfaces:
    ITimerTask

    public class LongPollService
    extends Object
    implements ITimerTask
    This service deals with polling the remote service for tracepoint configs.
    • Constructor Detail

      • LongPollService

        public LongPollService​(Settings settings,
                               GrpcService grpcService)
        Create a new service.
        Parameters:
        settings - the deep settings
        grpcService - the deep grpc service
    • Method Detail

      • run

        public void run​(long now)
        Description copied from interface: ITimerTask
        This method is called by the DriftAwareThread at the end of each interval.
        Specified by:
        run in interface ITimerTask
        Parameters:
        now - the current time
      • callback

        public long callback​(long duration,
                             long nextExecutionTime)
        Description copied from interface: ITimerTask
        This method is called after the ITimerTask.run(long) method to allow performance tracking.
        Specified by:
        callback in interface ITimerTask
        Parameters:
        duration - the duration of the last execution
        nextExecutionTime - the next calculated execution time
        Returns:
        the modified execution next time