Package org.apache.olingo.odata2.core
Class ODataContextImpl.RuntimeMeasurementImpl
java.lang.Object
org.apache.olingo.odata2.core.ODataContextImpl.RuntimeMeasurementImpl
- All Implemented Interfaces:
ODataContext.RuntimeMeasurement
- Enclosing class:
- ODataContextImpl
protected class ODataContextImpl.RuntimeMeasurementImpl
extends Object
implements ODataContext.RuntimeMeasurement
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the class name.longGets the start heap memory used.longGets the stop heap memory used.Gets the method name.longGets the start time.longGets the stop time.voidsetClassName(String className) Sets the class name.voidsetMemoryStarted(long used) Sets the start heap memory used.voidsetMemoryStopped(long used) Sets the stop heap memory used.voidsetMethodName(String methodName) Sets the method name.voidsetTimeStarted(long start) Sets the start time.voidsetTimeStopped(long stop) Sets the stop time.toString()
-
Constructor Details
-
RuntimeMeasurementImpl
protected RuntimeMeasurementImpl()
-
-
Method Details
-
setClassName
Description copied from interface:ODataContext.RuntimeMeasurementSets the class name.- Specified by:
setClassNamein interfaceODataContext.RuntimeMeasurement- Parameters:
className- the name of the class that is measured
-
getClassName
Description copied from interface:ODataContext.RuntimeMeasurementGets the class name.- Specified by:
getClassNamein interfaceODataContext.RuntimeMeasurement- Returns:
- the name of the class that is measured
-
setMethodName
Description copied from interface:ODataContext.RuntimeMeasurementSets the method name.- Specified by:
setMethodNamein interfaceODataContext.RuntimeMeasurement- Parameters:
methodName- the name of the method that is measured
-
getMethodName
Description copied from interface:ODataContext.RuntimeMeasurementGets the method name.- Specified by:
getMethodNamein interfaceODataContext.RuntimeMeasurement- Returns:
- the name of the method that is measured
-
setTimeStarted
public void setTimeStarted(long start) Description copied from interface:ODataContext.RuntimeMeasurementSets the start time.- Specified by:
setTimeStartedin interfaceODataContext.RuntimeMeasurement- Parameters:
start- the start time in nanoseconds- See Also:
-
getTimeStarted
public long getTimeStarted()Description copied from interface:ODataContext.RuntimeMeasurementGets the start time.- Specified by:
getTimeStartedin interfaceODataContext.RuntimeMeasurement- Returns:
- the start time in nanoseconds or 0 if not set yet
- See Also:
-
setTimeStopped
public void setTimeStopped(long stop) Description copied from interface:ODataContext.RuntimeMeasurementSets the stop time.- Specified by:
setTimeStoppedin interfaceODataContext.RuntimeMeasurement- Parameters:
stop- the stop time in nanoseconds- See Also:
-
getTimeStopped
public long getTimeStopped()Description copied from interface:ODataContext.RuntimeMeasurementGets the stop time.- Specified by:
getTimeStoppedin interfaceODataContext.RuntimeMeasurement- Returns:
- the stop time in nanoseconds or 0 if not set yet
- See Also:
-
toString
-
setMemoryStarted
public void setMemoryStarted(long used) Description copied from interface:ODataContext.RuntimeMeasurementSets the start heap memory used.- Specified by:
setMemoryStartedin interfaceODataContext.RuntimeMeasurement- Parameters:
used- the start heap memory used in bytes- See Also:
-
java.lang.ManagementFactory#getMemoryMXBean()
-
setMemoryStopped
public void setMemoryStopped(long used) Description copied from interface:ODataContext.RuntimeMeasurementSets the stop heap memory used.- Specified by:
setMemoryStoppedin interfaceODataContext.RuntimeMeasurement- Parameters:
used- the stop heap memory used in bytes- See Also:
-
java.lang.ManagementFactory#getMemoryMXBean()
-
getMemoryStarted
public long getMemoryStarted()Description copied from interface:ODataContext.RuntimeMeasurementGets the start heap memory used.- Specified by:
getMemoryStartedin interfaceODataContext.RuntimeMeasurement- Returns:
- start heap memory used or 0 if not set
- See Also:
-
java.lang.ManagementFactory#getMemoryMXBean()
-
getMemoryStopped
public long getMemoryStopped()Description copied from interface:ODataContext.RuntimeMeasurementGets the stop heap memory used.- Specified by:
getMemoryStoppedin interfaceODataContext.RuntimeMeasurement- Returns:
- stop heap memory used or 0 if not set
- See Also:
-
java.lang.ManagementFactory#getMemoryMXBean()
-