Package com.intergral.deep.agent.poll
Class LongPollService
- java.lang.Object
-
- com.intergral.deep.agent.poll.LongPollService
-
- All Implemented Interfaces:
ITimerTask
public class LongPollService extends Object implements ITimerTask
This service deals with polling the remote service for tracepoint configs.
-
-
Constructor Summary
Constructors Constructor Description LongPollService(Settings settings, GrpcService grpcService)
Create a new service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
callback(long duration, long nextExecutionTime)
This method is called after theITimerTask.run(long)
method to allow performance tracking.void
run(long now)
This method is called by theDriftAwareThread
at the end of each interval.void
start(ITracepointConfig tracepointConfig)
-
-
-
Constructor Detail
-
LongPollService
public LongPollService(Settings settings, GrpcService grpcService)
Create a new service.- Parameters:
settings
- the deep settingsgrpcService
- the deep grpc service
-
-
Method Detail
-
start
public void start(ITracepointConfig tracepointConfig)
-
run
public void run(long now)
Description copied from interface:ITimerTask
This method is called by theDriftAwareThread
at the end of each interval.- Specified by:
run
in interfaceITimerTask
- Parameters:
now
- the current time
-
callback
public long callback(long duration, long nextExecutionTime)
Description copied from interface:ITimerTask
This method is called after theITimerTask.run(long)
method to allow performance tracking.- Specified by:
callback
in interfaceITimerTask
- Parameters:
duration
- the duration of the last executionnextExecutionTime
- the next calculated execution time- Returns:
- the modified execution next time
-
-