Class NullTracker
java.lang.Object
com.aquima.interactions.foundation.timetracker.NullTracker
- All Implemented Interfaces:
ITimeTracker
,Serializable
Utility class to disable time tracking.
- Since:
- 5.0
- Author:
- Jon van Leuven
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
Always returns 0.void
endAll()
Ends all open time trackers.long
Always returns 0.getName()
Always returns null.long
Always returns 0.long
Always returns 0.getType()
Always returns null.void
iterateChilds
(IChildVisitor visitor) Iterates all direct sub time trackers.void
log()
Logs the time tracker result to a default logger.void
Logs the time tracker result to a custom logger.void
Start a new sub time tracker.void
Start a new sub time tracker.toXml()
Always returns null.
-
Constructor Details
-
NullTracker
public NullTracker()
-
-
Method Details
-
end
Always returns 0.- Specified by:
end
in interfaceITimeTracker
- Parameters:
name
- name of the tracker, cannot be null- Returns:
- the time in milliseconds when the tracker is ended.
-
endAll
public void endAll()Description copied from interface:ITimeTracker
Ends all open time trackers.- Specified by:
endAll
in interfaceITimeTracker
-
getEndMillis
public long getEndMillis()Always returns 0.- Specified by:
getEndMillis
in interfaceITimeTracker
- Returns:
- the time in milliseconds when the tracker is ended.
-
getName
Always returns null.- Specified by:
getName
in interfaceITimeTracker
- Returns:
- The name of the time tracker.
-
getStartMillis
public long getStartMillis()Always returns 0.- Specified by:
getStartMillis
in interfaceITimeTracker
- Returns:
- the time in milliseconds when the tracker is started.
-
getTotalMillis
public long getTotalMillis()Always returns 0.- Specified by:
getTotalMillis
in interfaceITimeTracker
- Returns:
- the total processing time of the time tracker in milliseconds.
-
getType
Always returns null.- Specified by:
getType
in interfaceITimeTracker
- Returns:
- the type of the time tracker.
-
iterateChilds
Description copied from interface:ITimeTracker
Iterates all direct sub time trackers.- Specified by:
iterateChilds
in interfaceITimeTracker
- Parameters:
visitor
- to process children
-
log
public void log()Description copied from interface:ITimeTracker
Logs the time tracker result to a default logger.- Specified by:
log
in interfaceITimeTracker
-
log
Description copied from interface:ITimeTracker
Logs the time tracker result to a custom logger.- Specified by:
log
in interfaceITimeTracker
- Parameters:
log
- The logger that should be used to write the result to.
-
start
Description copied from interface:ITimeTracker
Start a new sub time tracker.- Specified by:
start
in interfaceITimeTracker
- Parameters:
name
- name of the tracker, cannot be nulltype
- type of tracker
-
start
Description copied from interface:ITimeTracker
Start a new sub time tracker.- Specified by:
start
in interfaceITimeTracker
- Parameters:
name
- name of the tracker, cannot be null
-
toXml
Always returns null.- Specified by:
toXml
in interfaceITimeTracker
- Returns:
- an XML representation of the time tracker.
-