Package overit.geocall.util.tracer
Class PlainTracer
java.lang.Object
overit.geocall.util.tracer.MemoryTracer
overit.geocall.util.tracer.PlainTracer
- All Implemented Interfaces:
Serializable,Tracer
This class extends the abstract class
This tracer put in the register the first
Usually the
MemoryTracer and creates an instance
of the tracer. This tracer put in the register the first
'n' rows, where 'n'
is the value of the parameter passed to the constructor PlainTracer(maxSize).Usually the
'maxSize' corresponds to the value ThreadContext.MAX_MEMORY_TRACE_SIZE.- See Also:
-
Field Summary
FieldsFields inherited from class overit.geocall.util.tracer.MemoryTracer
_maxSize, _time -
Constructor Summary
ConstructorsConstructorDescriptionPlainTracer(int maxSize) Class constructor using the first parameter to determine the maximum registry length. -
Method Summary
Methods inherited from class overit.geocall.util.tracer.MemoryTracer
makeTracer
-
Field Details
-
_registry
-
_lines
protected int _lines
-
-
Constructor Details
-
PlainTracer
public PlainTracer(int maxSize) Class constructor using the first parameter to determine the maximum registry length.- Parameters:
maxSize- Maximum registry length.
-
-
Method Details
-
getRegistry
Return theArrayListcalled"registry"containing all the records of the log.- Specified by:
getRegistryin classMemoryTracer- Returns:
- The
ArrayListcontains all the records of the log.
-
record
Adds a record of log to the registry. If the registry is full, the record will not be added and the last row contains the name"TRACE SPACE FULL"and the value empty. -
stop
public void stop()Method to call when the execution is finished. Takes care of calculating the execution time as a delta between the start and end processing time. -
getTraceTime
public long getTraceTime()Return the time of the execution. If thestop()has not been called, the value returned will be 0.- Specified by:
getTraceTimein interfaceTracer- Returns:
- The time of the execution.
-