Class TracepointConfigService
- java.lang.Object
-
- com.intergral.deep.agent.tracepoint.TracepointConfigService
-
- All Implemented Interfaces:
ITracepointConfig
public class TracepointConfigService extends Object implements ITracepointConfig
This service deals with mapping the response from polls into actions to install tracepoints.
-
-
Field Summary
Fields Modifier and Type Field Description protected Collection<TracePointConfig>installedTracepoints
-
Constructor Summary
Constructors Constructor Description TracepointConfigService(TracepointInstrumentationService tracepointInstrumentationService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TracePointConfigaddCustom(String path, int line, Map<String,String> args, Collection<String> watches, Collection<MetricDefinition> metrics)Add a new tracepoint via code api.voidconfigUpdate(long tsNano, String hash, Collection<TracePointConfig> tracepoints)This indicates that the config from the servers has changed, and we should inform the instrumentation services.StringcurrentHash()Get the hash of the config last used to update the config.longlastUpdate()Collection<TracePointConfig>loadTracepointConfigs(Collection<String> tracepointId)Load the full configs for the given tracepoints ids.voidnoChange(long tsNano)Called when there is no change to the config so just update last seen.voidremoveCustom(TracePointConfig tracePointConfig)Remove a custom tracepoint.
-
-
-
Field Detail
-
installedTracepoints
protected Collection<TracePointConfig> installedTracepoints
-
-
Constructor Detail
-
TracepointConfigService
public TracepointConfigService(TracepointInstrumentationService tracepointInstrumentationService)
-
-
Method Detail
-
noChange
public void noChange(long tsNano)
Description copied from interface:ITracepointConfigCalled when there is no change to the config so just update last seen.- Specified by:
noChangein interfaceITracepointConfig- Parameters:
tsNano- the time of the config update
-
configUpdate
public void configUpdate(long tsNano, String hash, Collection<TracePointConfig> tracepoints)Description copied from interface:ITracepointConfigThis indicates that the config from the servers has changed, and we should inform the instrumentation services.- Specified by:
configUpdatein interfaceITracepointConfig- Parameters:
tsNano- the time of the updatehash- the new config hashtracepoints- the new config
-
currentHash
public String currentHash()
Description copied from interface:ITracepointConfigGet the hash of the config last used to update the config. This hash should be sent with the calls for new configs, so the server knows what the clients config is and can detect changes.- Specified by:
currentHashin interfaceITracepointConfig- Returns:
- the current hash.
-
loadTracepointConfigs
public Collection<TracePointConfig> loadTracepointConfigs(Collection<String> tracepointId)
Description copied from interface:ITracepointConfigLoad the full configs for the given tracepoints ids.- Specified by:
loadTracepointConfigsin interfaceITracepointConfig- Parameters:
tracepointId- the tracepoint ids- Returns:
- a collection of all the matched tracepoints
-
addCustom
public TracePointConfig addCustom(String path, int line, Map<String,String> args, Collection<String> watches, Collection<MetricDefinition> metrics)
Add a new tracepoint via code api.- Parameters:
path- the tracepoint pathline- the tracepoint lineargs- the tracepoint argswatches- the tracepoint watchesmetrics- the list of metric expressions- Returns:
- the new tracepoint config
- See Also:
IDeep.registerTracepoint(String, int)
-
removeCustom
public void removeCustom(TracePointConfig tracePointConfig)
Remove a custom tracepoint.- Parameters:
tracePointConfig- the tracepoint to remove- See Also:
IDeep.registerTracepoint(String, int)
-
lastUpdate
public long lastUpdate()
-
-