Class StoreDataAudit


  • public class StoreDataAudit
    extends java.lang.Object
    This is a class used to manage multiple replicas of the same store. The insert function will determine the latest version of the store across all replicas, and store the StoreInfo in either healthy or stale region map, rebalancing these when needed. The class also keeps version info about replicas at the top level, with latestCreatedVersion and latestSuccessfulPushVersion being maintained internally.
    • Constructor Detail

      • StoreDataAudit

        public StoreDataAudit()
    • Method Detail

      • getHealthyRegions

        public java.util.Map<java.lang.String,​StoreInfo> getHealthyRegions()
      • getStaleRegions

        public java.util.Map<java.lang.String,​StoreInfo> getStaleRegions()
      • getLatestCreatedVersion

        public int getLatestCreatedVersion()
      • getLatestSuccessfulPushVersion

        public int getLatestSuccessfulPushVersion()
      • getStoreName

        public java.lang.String getStoreName()
      • setHealthyRegions

        public void setHealthyRegions​(java.util.Map<java.lang.String,​StoreInfo> healthyRegions)
      • setStaleRegions

        public void setStaleRegions​(java.util.Map<java.lang.String,​StoreInfo> staleRegions)
      • setLatestCreatedVersion

        public void setLatestCreatedVersion​(int latestCreatedVersion)
      • setLatestSuccessfulPushVersion

        public void setLatestSuccessfulPushVersion​(int latestSuccessfulPushVersion)
      • setStoreName

        public void setStoreName​(java.lang.String storeName)
      • insert

        public void insert​(java.lang.String regionName,
                           StoreInfo info)
      • toString

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