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 TracePointConfig
addCustom(String path, int line, Map<String,String> args, Collection<String> watches, Collection<MetricDefinition> metrics)
Add a new tracepoint via code api.void
configUpdate(long tsNano, String hash, Collection<TracePointConfig> tracepoints)
This indicates that the config from the servers has changed, and we should inform the instrumentation services.String
currentHash()
Get the hash of the config last used to update the config.long
lastUpdate()
Collection<TracePointConfig>
loadTracepointConfigs(Collection<String> tracepointId)
Load the full configs for the given tracepoints ids.void
noChange(long tsNano)
Called when there is no change to the config so just update last seen.void
removeCustom(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:ITracepointConfig
Called when there is no change to the config so just update last seen.- Specified by:
noChange
in interfaceITracepointConfig
- Parameters:
tsNano
- the time of the config update
-
configUpdate
public void configUpdate(long tsNano, String hash, Collection<TracePointConfig> tracepoints)
Description copied from interface:ITracepointConfig
This indicates that the config from the servers has changed, and we should inform the instrumentation services.- Specified by:
configUpdate
in interfaceITracepointConfig
- Parameters:
tsNano
- the time of the updatehash
- the new config hashtracepoints
- the new config
-
currentHash
public String currentHash()
Description copied from interface:ITracepointConfig
Get 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:
currentHash
in interfaceITracepointConfig
- Returns:
- the current hash.
-
loadTracepointConfigs
public Collection<TracePointConfig> loadTracepointConfigs(Collection<String> tracepointId)
Description copied from interface:ITracepointConfig
Load the full configs for the given tracepoints ids.- Specified by:
loadTracepointConfigs
in 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()
-
-