Class AbstractOperationStatistic<T extends java.lang.Enum<T>>

    • Field Detail

      • name

        public final java.lang.String name
      • tags

        public final java.util.Set<java.lang.String> tags
      • properties

        public final java.util.Map<java.lang.String,​java.lang.Object> properties
      • type

        public final java.lang.Class<T extends java.lang.Enum<T>> type
      • operationStartTime

        private final java.lang.ThreadLocal<java.lang.Long> operationStartTime
    • Constructor Detail

      • AbstractOperationStatistic

        AbstractOperationStatistic​(java.lang.String name,
                                   java.util.Set<java.lang.String> tags,
                                   java.util.Map<java.lang.String,​? extends java.lang.Object> properties,
                                   java.lang.Class<T> type)
        Create an operation statistics for a given operation result type.
        Parameters:
        properties - a set of context properties
        type - operation result type
    • Method Detail

      • begin

        public void begin()
        Description copied from interface: OperationObserver
        Called immediately prior to the operation beginning.
        Specified by:
        begin in interface OperationObserver<T extends java.lang.Enum<T>>
      • end

        public void end​(T result)
        Description copied from interface: OperationObserver
        Called immediately after the operation completes with no interesting parameters, and with the same thread the called {OperationObserver.begin()} before.
        Specified by:
        end in interface OperationObserver<T extends java.lang.Enum<T>>
        Parameters:
        result - the operation result