Package org.apache.uima.internal.util
Class InstrumentationFacility_impl
- java.lang.Object
-
- org.apache.uima.internal.util.InstrumentationFacility_impl
-
- All Implemented Interfaces:
InstrumentationFacility
public class InstrumentationFacility_impl extends java.lang.Object implements InstrumentationFacility
Reference implementation ofInstrumentationFacility.
-
-
Constructor Summary
Constructors Constructor Description InstrumentationFacility_impl(ProcessTrace aProcessTrace)Creates a new InstrumentationFacility_impl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEvent(java.lang.String aResourceName, java.lang.String aType, java.lang.String aDescription, int aDuration, java.lang.String aResultMsg)Records a completed event with the specified parameters.voidendEvent(java.lang.String aComponentName, java.lang.String aEventType, java.lang.String aResultMessage)Records the end of an event.voidsetProcessTrace(ProcessTrace aProcessTrace)Sets the process trace object wrapped by this instrumentation facility.voidstartEvent(java.lang.String aComponentName, java.lang.String aEventType, java.lang.String aDescription)Records the start of an event.
-
-
-
Constructor Detail
-
InstrumentationFacility_impl
public InstrumentationFacility_impl(ProcessTrace aProcessTrace)
Creates a new InstrumentationFacility_impl.- Parameters:
aProcessTrace- the process trace object in which to record instrumentation information.
-
-
Method Detail
-
startEvent
public void startEvent(java.lang.String aComponentName, java.lang.String aEventType, java.lang.String aDescription)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:
InstrumentationFacility.startEvent(java.lang.String, java.lang.String, java.lang.String)
-
endEvent
public void endEvent(java.lang.String aComponentName, java.lang.String aEventType, java.lang.String aResultMessage)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:
InstrumentationFacility.endEvent(java.lang.String, java.lang.String, java.lang.String)
-
addEvent
public void addEvent(java.lang.String aResourceName, java.lang.String aType, java.lang.String aDescription, int aDuration, java.lang.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:
InstrumentationFacility.addEvent(java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)
-
setProcessTrace
public void setProcessTrace(ProcessTrace aProcessTrace)
Sets the process trace object wrapped by this instrumentation facility. This is not part of the InstrumentationFacility interface.- Parameters:
aProcessTrace- -
-
-