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
ConstructorDescriptionHelixReadWriteStoreRepository
(org.apache.helix.zookeeper.impl.client.ZkClient zkClient, HelixAdapterSerializer compositeSerializer, String clusterName, Optional<MetaStoreWriter> metaStoreWriter, ClusterLockManager storeLock) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add store into repository.void
deleteStore
(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 ZKvoid
updateStore
(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, unregisterStoreDataChangedListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.linkedin.venice.meta.ReadOnlyStoreRepository
getBatchGetLimit, getTotalStoreReadQuota, hasStore, isReadComputationEnabled, registerStoreDataChangedListener, unregisterStoreDataChangedListener, waitVersion, waitVersion
Methods 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:ReadWriteStoreRepository
Add store into repository.- Specified by:
addStore
in interfaceReadWriteStoreRepository
- Parameters:
store
- store need to be added.
-
updateStore
Description copied from interface:ReadWriteStoreRepository
Update store in repository.- Specified by:
updateStore
in interfaceReadWriteStoreRepository
- Parameters:
store
- store need to be udpated.
-
deleteStore
Description copied from interface:ReadWriteStoreRepository
Delete store from repository.- Specified by:
deleteStore
in interfaceReadWriteStoreRepository
- Parameters:
storeName
- name of wantted store.
-
getStore
Description copied from interface:ReadOnlyStoreRepository
Get one store by given name from repository.- Specified by:
getStore
in interfaceReadOnlyStoreRepository
- Overrides:
getStore
in classCachedReadOnlyStoreRepository
- Parameters:
storeName
- name of wanted store.- Returns:
- Store for given name.
-
getStoreOrThrow
- Specified by:
getStoreOrThrow
in interfaceReadOnlyStoreRepository
- Overrides:
getStoreOrThrow
in classCachedReadOnlyStoreRepository
- Throws:
VeniceNoStoreException
-
getAllStores
Description copied from interface:ReadOnlyStoreRepository
Get all stores in the current repository- Specified by:
getAllStores
in interfaceReadOnlyStoreRepository
- Overrides:
getAllStores
in classCachedReadOnlyStoreRepository
- Returns:
-
refreshOneStore
Description copied from interface:ReadOnlyStoreRepository
Selective refresh operation which fetches one store from ZK- Specified by:
refreshOneStore
in interfaceReadOnlyStoreRepository
- Overrides:
refreshOneStore
in classCachedReadOnlyStoreRepository
- Parameters:
storeName
- store name- Returns:
- the newly refreshed store
-