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
ConstructorsConstructorDescriptionInstrumentationFacility_impl(ProcessTrace aProcessTrace) Creates a new InstrumentationFacility_impl. -
Method Summary
Modifier and TypeMethodDescriptionvoidRecords a completed event with the specified parameters.voidRecords the end of an event.voidsetProcessTrace(ProcessTrace aProcessTrace) Sets the process trace object wrapped by this instrumentation facility.voidstartEvent(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:InstrumentationFacilityRecords 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:
startEventin interfaceInstrumentationFacility- Parameters:
aComponentName- name of the component generating the eventaEventType- type of the event. Standard types are defined as constants on theProcessTraceEventinterface, but any string may be used.aDescription- description of the event- See Also:
-
endEvent
Description copied from interface:InstrumentationFacilityRecords 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_IllegalStateExceptionwill be thrown.- Specified by:
endEventin interfaceInstrumentationFacility- Parameters:
aComponentName- name of the component generating the eventaEventType- type of the event. Standard types are defined as constants on theProcessTraceEventinterface, 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:InstrumentationFacilityRecords a completed event with the specified parameters.- Specified by:
addEventin interfaceInstrumentationFacility- Parameters:
aResourceName- name of the component generating the eventaType- type of the event. Standard types are defined as constants on theProcessTraceEventinterface, 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- -
-