Package org.topbraid.jenax.statistics
Class ExecStatisticsManager
- java.lang.Object
-
- org.topbraid.jenax.statistics.ExecStatisticsManager
-
public class ExecStatisticsManager extends Object
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 withsetRecording(true);.- Author:
- Holger Knublauch
-
-
Constructor Summary
Constructors Constructor Description ExecStatisticsManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(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.List<ExecStatistics>getStatistics()Gets all previously added statistics.booleanisRecording()booleanisRecordingDeclarativeFunctions()booleanisRecordingNativeFunctions()voidnotifyListeners()Notifies all registered listeners so that they can refresh themselves.voidremoveListener(ExecStatisticsListener listener)voidreset()voidsetRecording(boolean value)voidsetRecordingDeclarativeFunctions(boolean value)voidsetRecordingNativeFunctions(boolean value)
-
-
-
Method Detail
-
get
public static ExecStatisticsManager get()
Gets the singleton instance of this class.- Returns:
- the ExecStatisticsManager (never null)
-
addListener
public void addListener(ExecStatisticsListener listener)
-
add
public void add(Iterable<ExecStatistics> values)
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
public void addSilently(Iterable<ExecStatistics> values)
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
public List<ExecStatistics> getStatistics()
Gets all previously added statistics.- Returns:
- the statistics
-
isRecording
public boolean isRecording()
-
isRecordingDeclarativeFunctions
public boolean isRecordingDeclarativeFunctions()
-
isRecordingNativeFunctions
public boolean isRecordingNativeFunctions()
-
removeListener
public void removeListener(ExecStatisticsListener listener)
-
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)
-
-