Package com.linkedin.venice.helix
Class HelixReadWriteStoreRepository
java.lang.Object
com.linkedin.venice.helix.CachedReadOnlyStoreRepository
com.linkedin.venice.helix.HelixReadWriteStoreRepository
- All Implemented Interfaces:
ReadOnlyStoreRepository,ReadWriteStoreRepository,VeniceResource
public class HelixReadWriteStoreRepository
extends CachedReadOnlyStoreRepository
implements ReadWriteStoreRepository
Read write store repository which uses Helix as storage.
This repository does NOT listen the change of store from ZK. Because in Venice, this is the only once place to modify stores.
-
Field Summary
Fields inherited from class com.linkedin.venice.helix.CachedReadOnlyStoreRepository
clusterLockManager, clusterStoreRepositoryPath, STORE_REPOSITORY_PATH, storeMap, zkClient, zkDataAccessor -
Constructor Summary
ConstructorsConstructorDescriptionHelixReadWriteStoreRepository(org.apache.helix.zookeeper.impl.client.ZkClient zkClient, HelixAdapterSerializer compositeSerializer, String clusterName, Optional<MetaStoreWriter> metaStoreWriter, ClusterLockManager storeLock) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd store into repository.voiddeleteStore(String storeName) Delete store from repository.Get all stores in the current repositoryGet one store by given name from repository.getStoreOrThrow(String storeName) refreshOneStore(String storeName) Selective refresh operation which fetches one store from ZKvoidupdateStore(Store store) Update store in repository.Methods inherited from class com.linkedin.venice.helix.CachedReadOnlyStoreRepository
clear, getBatchGetLimit, getStoreFromZk, getStoresFromZk, getStoresFromZk, getStoreZkPath, getTotalStoreReadQuota, hasStore, isReadComputationEnabled, notifyStoreChanged, notifyStoreCreated, notifyStoreDeleted, putStore, refresh, registerStoreDataChangedListener, removeStore, unregisterStoreDataChangedListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.linkedin.venice.meta.ReadOnlyStoreRepository
getBatchGetLimit, getTotalStoreReadQuota, hasStore, isReadComputationEnabled, registerStoreDataChangedListener, unregisterStoreDataChangedListener, waitVersion, waitVersionMethods inherited from interface com.linkedin.venice.VeniceResource
clear, refresh
-
Constructor Details
-
HelixReadWriteStoreRepository
public HelixReadWriteStoreRepository(org.apache.helix.zookeeper.impl.client.ZkClient zkClient, HelixAdapterSerializer compositeSerializer, String clusterName, Optional<MetaStoreWriter> metaStoreWriter, ClusterLockManager storeLock)
-
-
Method Details
-
addStore
Description copied from interface:ReadWriteStoreRepositoryAdd store into repository.- Specified by:
addStorein interfaceReadWriteStoreRepository- Parameters:
store- store need to be added.
-
updateStore
Description copied from interface:ReadWriteStoreRepositoryUpdate store in repository.- Specified by:
updateStorein interfaceReadWriteStoreRepository- Parameters:
store- store need to be udpated.
-
deleteStore
Description copied from interface:ReadWriteStoreRepositoryDelete store from repository.- Specified by:
deleteStorein interfaceReadWriteStoreRepository- Parameters:
storeName- name of wantted store.
-
getStore
Description copied from interface:ReadOnlyStoreRepositoryGet one store by given name from repository.- Specified by:
getStorein interfaceReadOnlyStoreRepository- Overrides:
getStorein classCachedReadOnlyStoreRepository- Parameters:
storeName- name of wanted store.- Returns:
- Store for given name.
-
getStoreOrThrow
- Specified by:
getStoreOrThrowin interfaceReadOnlyStoreRepository- Overrides:
getStoreOrThrowin classCachedReadOnlyStoreRepository- Throws:
VeniceNoStoreException
-
getAllStores
Description copied from interface:ReadOnlyStoreRepositoryGet all stores in the current repository- Specified by:
getAllStoresin interfaceReadOnlyStoreRepository- Overrides:
getAllStoresin classCachedReadOnlyStoreRepository- Returns:
-
refreshOneStore
Description copied from interface:ReadOnlyStoreRepositorySelective refresh operation which fetches one store from ZK- Specified by:
refreshOneStorein interfaceReadOnlyStoreRepository- Overrides:
refreshOneStorein classCachedReadOnlyStoreRepository- Parameters:
storeName- store name- Returns:
- the newly refreshed store
-