Package com.linkedin.venice.admin
Class InMemoryExecutionIdAccessor
java.lang.Object
com.linkedin.venice.admin.InMemoryExecutionIdAccessor
- All Implemented Interfaces:
ExecutionIdAccessor
In memory implementation of
ExecutionIdAccessor, should only be used for testing purposes.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncleanExecutionIdMap(String clusterName, Set<String> allStores) getLastGeneratedExecutionId(String clusterName) Get the last id which is generated by execution tracker in the give cluster.getLastSucceededExecutionId(String clusterName) Get the id for the last succeed operation in the given cluster.getLastSucceededExecutionIdMap(String clusterName) Get the execution id map that contains the last succeeded operation in the given cluster for each store.incrementAndGetExecutionId(String clusterName) Read the current value from ZK and try to increment the value by 1 and write it back to ZK.voidsetExecutionId(long value) voidupdateLastGeneratedExecutionId(String clusterName, Long lastGeneratedExecutionId) Update the last id which is generated by execution tracker in the given cluster.voidupdateLastSucceededExecutionId(String clusterName, Long lastSucceedExecutionId) Update the id of the last succeed operation in the given cluster.voidupdateLastSucceededExecutionIdMap(String clusterName, String storeName, Long lastSucceededExecutionId) Update the execution id map that contains the last succeeded operation in the given cluster for each store.
-
Constructor Details
-
InMemoryExecutionIdAccessor
public InMemoryExecutionIdAccessor()
-
-
Method Details
-
getLastSucceededExecutionId
Description copied from interface:ExecutionIdAccessorGet the id for the last succeed operation in the given cluster.- Specified by:
getLastSucceededExecutionIdin interfaceExecutionIdAccessor
-
updateLastSucceededExecutionId
Description copied from interface:ExecutionIdAccessorUpdate the id of the last succeed operation in the given cluster.- Specified by:
updateLastSucceededExecutionIdin interfaceExecutionIdAccessor
-
getLastSucceededExecutionIdMap
Description copied from interface:ExecutionIdAccessorGet the execution id map that contains the last succeeded operation in the given cluster for each store.- Specified by:
getLastSucceededExecutionIdMapin interfaceExecutionIdAccessor
-
updateLastSucceededExecutionIdMap
public void updateLastSucceededExecutionIdMap(String clusterName, String storeName, Long lastSucceededExecutionId) Description copied from interface:ExecutionIdAccessorUpdate the execution id map that contains the last succeeded operation in the given cluster for each store.- Specified by:
updateLastSucceededExecutionIdMapin interfaceExecutionIdAccessor
-
getLastGeneratedExecutionId
Description copied from interface:ExecutionIdAccessorGet the last id which is generated by execution tracker in the give cluster.- Specified by:
getLastGeneratedExecutionIdin interfaceExecutionIdAccessor
-
updateLastGeneratedExecutionId
Description copied from interface:ExecutionIdAccessorUpdate the last id which is generated by execution tracker in the given cluster.- Specified by:
updateLastGeneratedExecutionIdin interfaceExecutionIdAccessor
-
cleanExecutionIdMap
- Specified by:
cleanExecutionIdMapin interfaceExecutionIdAccessor
-
incrementAndGetExecutionId
Description copied from interface:ExecutionIdAccessorRead the current value from ZK and try to increment the value by 1 and write it back to ZK.- Specified by:
incrementAndGetExecutionIdin interfaceExecutionIdAccessor- Returns:
- updated execution id.
-
setExecutionId
public void setExecutionId(long value)
-