Interface StatisticsCollector

    • Method Detail

      • incrementLoadCount

        default <K> long incrementLoadCount​(IncrementLoadCountStatisticsContext<K> context)
        Called to increment the number of loads
        Type Parameters:
        K - the class of the key in the data loader
        Parameters:
        context - the context containing metadata of the data loader invocation
        Returns:
        the current value after increment
      • incrementLoadErrorCount

        default <K> long incrementLoadErrorCount​(IncrementLoadErrorCountStatisticsContext<K> context)
        Called to increment the number of loads that resulted in an object deemed in error
        Type Parameters:
        K - the class of the key in the data loader
        Parameters:
        context - the context containing metadata of the data loader invocation
        Returns:
        the current value after increment
      • incrementBatchLoadCountBy

        default <K> long incrementBatchLoadCountBy​(long delta,
                                                   IncrementBatchLoadCountByStatisticsContext<K> context)
        Called to increment the number of batch loads
        Type Parameters:
        K - the class of the key in the data loader
        Parameters:
        delta - how much to add to the count
        context - the context containing metadata of the data loader invocation
        Returns:
        the current value after increment
      • incrementBatchLoadExceptionCount

        default <K> long incrementBatchLoadExceptionCount​(IncrementBatchLoadExceptionCountStatisticsContext<K> context)
        Called to increment the number of batch loads exceptions
        Type Parameters:
        K - the class of the key in the data loader
        Parameters:
        context - the context containing metadata of the data loader invocation
        Returns:
        the current value after increment
      • incrementCacheHitCount

        default <K> long incrementCacheHitCount​(IncrementCacheHitCountStatisticsContext<K> context)
        Called to increment the number of cache hits
        Type Parameters:
        K - the class of the key in the data loader
        Parameters:
        context - the context containing metadata of the data loader invocation
        Returns:
        the current value after increment
      • getStatistics

        Statistics getStatistics()
        Returns:
        the statistics that have been gathered to this point in time