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 longcallback(long duration, long nextExecutionTime)This method is called after theITimerTask.run(long)method to allow performance tracking.voidrun(long now)This method is called by theDriftAwareThreadat the end of each interval.voidstart(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:ITimerTaskThis method is called by theDriftAwareThreadat the end of each interval.- Specified by:
runin interfaceITimerTask- Parameters:
now- the current time
-
callback
public long callback(long duration, long nextExecutionTime)Description copied from interface:ITimerTaskThis method is called after theITimerTask.run(long)method to allow performance tracking.- Specified by:
callbackin interfaceITimerTask- Parameters:
duration- the duration of the last executionnextExecutionTime- the next calculated execution time- Returns:
- the modified execution next time
-
-