Class AbstractVeniceAggVersionedStats<STATS,​STATS_REPORTER extends AbstractVeniceStatsReporter<STATS>>

    • Constructor Detail

      • AbstractVeniceAggVersionedStats

        public AbstractVeniceAggVersionedStats​(io.tehuti.metrics.MetricsRepository metricsRepository,
                                               ReadOnlyStoreRepository metadataRepository,
                                               java.util.function.Supplier<STATS> statsInitiator,
                                               StatsSupplier<STATS_REPORTER> reporterSupplier,
                                               boolean unregisterMetricForDeletedStoreEnabled)
    • Method Detail

      • loadAllStats

        public void loadAllStats()
      • recordVersionedAndTotalStat

        protected void recordVersionedAndTotalStat​(java.lang.String storeName,
                                                   int version,
                                                   java.util.function.Consumer<STATS> function)
      • getTotalStats

        protected STATS getTotalStats​(java.lang.String storeName)
      • getStats

        protected STATS getStats​(java.lang.String storeName,
                                 int version)
      • registerConditionalStats

        protected void registerConditionalStats​(java.lang.String storeName)
      • updateStatsVersionInfo

        protected void updateStatsVersionInfo​(java.lang.String storeName,
                                              java.util.List<Version> existingVersions,
                                              int newCurrentVersion)
      • isFutureVersion

        public boolean isFutureVersion​(java.lang.String storeName,
                                       int version)
      • getFutureVersion

        protected int getFutureVersion​(java.lang.String storeName)
        return Store.NON_EXISTING_VERSION if future version doesn't exist.
      • getCurrentVersion

        protected int getCurrentVersion​(java.lang.String storeName)
        return Store.NON_EXISTING_VERSION if current version doesn't exist.
      • updateTotalStats

        protected void updateTotalStats​(java.lang.String storeName)
        Some versioned stats might always increasing; in this case, the value in the total stats should be updated with the aggregated values across the new version list.