Class AbstractActionStatsCollector<E extends Enum<E>>

    • Field Detail

      • categoriesEnumClass

        protected final Class<E extends Enum<E>> categoriesEnumClass
    • Constructor Detail

      • AbstractActionStatsCollector

        public AbstractActionStatsCollector​(Class<E> categoriesEnumClass)
        Constructor
        Parameters:
        categoriesEnumClass - the enum describing the different categories to be tracked
    • Method Detail

      • duration

        public long duration()
        Specified by:
        duration in interface ActionStatsCollector<E extends Enum<E>>
        Returns:
        The current duration (in microseconds) of the started action. Returns an undefined value if no action has been started yet.
      • end

        public long end​(E category)
        Description copied from interface: ActionStatsCollector
        Indicates that an action has terminated.
        Specified by:
        end in interface ActionStatsCollector<E extends Enum<E>>
        Parameters:
        category - The category to place the action stats into
        Returns:
        The duration, in microseconds, of the action
      • end

        public long end​(E category,
                        long startTime)
      • innerStart

        protected abstract void innerStart()
        The specific implementation of the "start" operation
      • innerEnd

        protected abstract void innerEnd​(E category,
                                         long duration)
        The specific implementation of the "end" operation
        Parameters:
        category - The action category
        duration - The measured action duration, in micros
      • getOwnMetrics

        public net.minidev.json.JSONObject getOwnMetrics()
        Specified by:
        getOwnMetrics in interface JsonMonitorable
        Returns:
        The json string describing the entity, not including the child entities.
      • getChildren

        public Map<String,​? extends JsonMonitorable> getChildren()
        Specified by:
        getChildren in interface JsonMonitorable
        Returns:
        The monitorable children of this entity, as [id, JsonExportable] pairs. Using this method, the framework can manage a complete tree to be monitored, where every entity has a unique path.