Package org.apache.uima.internal.util
Class InstrumentationFacility_impl
java.lang.Object
org.apache.uima.internal.util.InstrumentationFacility_impl
- All Implemented Interfaces:
InstrumentationFacility
Reference implementation of
InstrumentationFacility
.-
Constructor Summary
ConstructorDescriptionInstrumentationFacility_impl
(ProcessTrace aProcessTrace) Creates a new InstrumentationFacility_impl. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Records a completed event with the specified parameters.void
Records the end of an event.void
setProcessTrace
(ProcessTrace aProcessTrace) Sets the process trace object wrapped by this instrumentation facility.void
startEvent
(String aComponentName, String aEventType, String aDescription) Records the start of an event.
-
Constructor Details
-
InstrumentationFacility_impl
Creates a new InstrumentationFacility_impl.- Parameters:
aProcessTrace
- the process trace object in which to record instrumentation information.
-
-
Method Details
-
startEvent
Description copied from interface:InstrumentationFacility
Records the start of an event. The event will be ended when there is a corresponding call toInstrumentationFacility.endEvent(String,String,String)
with the same component name and event type. The duration of the event will be automatically computed from the difference in time between the start and end.- Specified by:
startEvent
in interfaceInstrumentationFacility
- Parameters:
aComponentName
- name of the component generating the eventaEventType
- type of the event. Standard types are defined as constants on theProcessTraceEvent
interface, but any string may be used.aDescription
- description of the event- See Also:
-
endEvent
Description copied from interface:InstrumentationFacility
Records the end of an event. The event is identified by the component name and type. If there is no open event that matches those values, aUIMA_IllegalStateException
will be thrown.- Specified by:
endEvent
in interfaceInstrumentationFacility
- Parameters:
aComponentName
- name of the component generating the eventaEventType
- type of the event. Standard types are defined as constants on theProcessTraceEvent
interface, but any string may be used.aResultMessage
- describes the result of the event- See Also:
-
addEvent
public void addEvent(String aResourceName, String aType, String aDescription, int aDuration, String aResultMsg) Description copied from interface:InstrumentationFacility
Records a completed event with the specified parameters.- Specified by:
addEvent
in interfaceInstrumentationFacility
- Parameters:
aResourceName
- name of the component generating the eventaType
- type of the event. Standard types are defined as constants on theProcessTraceEvent
interface, but any string may be used.aDescription
- description of the eventaDuration
- duration of the event in millisecondsaResultMsg
- result message of event- See Also:
-
setProcessTrace
Sets the process trace object wrapped by this instrumentation facility. This is not part of the InstrumentationFacility interface.- Parameters:
aProcessTrace
- -
-