Package org.topbraid.jenax.statistics
Class ExecStatisticsManager
java.lang.Object
org.topbraid.jenax.statistics.ExecStatisticsManager
A singleton managing execution statistics.
In TopBraid, this singleton is used as a single entry point for various
statistics producing engines such as TopSPIN and the SHACL processors.
The results are displayed in the Statistics view of TBC.
The ExecStatisticsManager is off by default, and needs to be activated
with
setRecording(true);.- Author:
- Holger Knublauch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Iterable<ExecStatistics> values) Adds new statistics and notifies any registered listeners.voidaddListener(ExecStatisticsListener listener) voidaddSilently(Iterable<ExecStatistics> values) Adds new statistics without notifying listeners.static ExecStatisticsManagerget()Gets the singleton instance of this class.Gets all previously added statistics.booleanbooleanbooleanvoidNotifies all registered listeners so that they can refresh themselves.voidremoveListener(ExecStatisticsListener listener) voidreset()voidsetRecording(boolean value) voidsetRecordingDeclarativeFunctions(boolean value) voidsetRecordingNativeFunctions(boolean value)
-
Constructor Details
-
ExecStatisticsManager
public ExecStatisticsManager()
-
-
Method Details
-
get
Gets the singleton instance of this class.- Returns:
- the ExecStatisticsManager (never null)
-
addListener
-
add
Adds new statistics and notifies any registered listeners. This should only be called ifisRecording()is true to prevent the unnecessary creation of SPINStatistics objects.- Parameters:
values- the statistics to add
-
addSilently
Adds new statistics without notifying listeners. This should only be called ifisRecording()is true to prevent the unnecessary creation of SPINStatistics objects.- Parameters:
values- the statistics to add
-
getStatistics
Gets all previously added statistics.- Returns:
- the statistics
-
isRecording
public boolean isRecording() -
isRecordingDeclarativeFunctions
public boolean isRecordingDeclarativeFunctions() -
isRecordingNativeFunctions
public boolean isRecordingNativeFunctions() -
removeListener
-
reset
public void reset() -
notifyListeners
public void notifyListeners()Notifies all registered listeners so that they can refresh themselves. -
setRecording
public void setRecording(boolean value) -
setRecordingDeclarativeFunctions
public void setRecordingDeclarativeFunctions(boolean value) -
setRecordingNativeFunctions
public void setRecordingNativeFunctions(boolean value)
-