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

    • Field Detail

      • counts

        private final java.util.concurrent.atomic.LongAdder[] counts
    • Constructor Detail

      • GeneralOperationStatistic

        GeneralOperationStatistic​(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

      • count

        public long count​(T type)
        Return the count of operations with the given type.
        Specified by:
        count in interface OperationStatistic<T extends java.lang.Enum<T>>
        Parameters:
        type - the result type
        Returns:
        the operation count
      • sum

        public long sum​(java.util.Set<T> types)
        Specified by:
        sum in interface OperationStatistic<T extends java.lang.Enum<T>>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object