Class MappedOperationStatistic<S extends java.lang.Enum<S>,​D extends java.lang.Enum<D>>

    • 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
      • outcomeType

        public final java.lang.Class<D extends java.lang.Enum<D>> outcomeType
      • mapper

        private final StatisticMapper<S extends java.lang.Enum<S>,​D extends java.lang.Enum<D>> mapper
    • Constructor Detail

      • MappedOperationStatistic

        public MappedOperationStatistic​(java.lang.Object tier,
                                        java.util.Map<D,​java.util.Set<S>> translation,
                                        java.lang.String statisticName,
                                        int tierHeight,
                                        java.lang.String targetName,
                                        java.lang.String discriminator)
    • Method Detail

      • count

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

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

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

        public void end​(D 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<S extends java.lang.Enum<S>>
        Parameters:
        result - the operation result
      • findOperationStat

        private static <S extends java.lang.Enum<S>> OperationStatistic<S> findOperationStat​(java.lang.Object rootNode,
                                                                                             java.lang.Class<S> statisticType,
                                                                                             java.lang.String statName)