Interface StatisticsCollector

    • Method Detail

      • incrementLoadCount

        default <K> void 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
      • incrementLoadErrorCount

        default <K> void 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
      • incrementBatchLoadCountBy

        default <K> void 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
      • incrementBatchLoadExceptionCount

        default <K> void 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
      • incrementCacheHitCount

        default <K> void 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
      • getStatistics

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