Package com.linkedin.venice.meta
Class StoreDataAudit
- java.lang.Object
-
- com.linkedin.venice.meta.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 Summary
Constructors Constructor Description StoreDataAudit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StoreInfo
getAny()
java.util.Map<java.lang.String,StoreInfo>
getHealthyRegions()
int
getLatestCreatedVersion()
int
getLatestSuccessfulPushVersion()
java.util.Map<java.lang.String,StoreInfo>
getStaleRegions()
java.lang.String
getStoreName()
void
insert(java.lang.String regionName, StoreInfo info)
void
merge(StoreDataAudit a)
void
setHealthyRegions(java.util.Map<java.lang.String,StoreInfo> healthyRegions)
void
setLatestCreatedVersion(int latestCreatedVersion)
void
setLatestSuccessfulPushVersion(int latestSuccessfulPushVersion)
void
setStaleRegions(java.util.Map<java.lang.String,StoreInfo> staleRegions)
void
setStoreName(java.lang.String storeName)
java.lang.String
toString()
-
-
-
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)
-
merge
public void merge(StoreDataAudit a)
-
getAny
public StoreInfo getAny()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-