Package com.linkedin.venice.helix
Class HelixReadOnlyStoreRepositoryAdapter
java.lang.Object
com.linkedin.venice.helix.HelixReadOnlyStoreRepositoryAdapter
- All Implemented Interfaces:
ReadOnlyStoreRepository,VeniceResource
- Direct Known Subclasses:
HelixReadWriteStoreRepositoryAdapter
This repository provides an read only interface to access both system store and regular venice store.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassStoreDataChangedListenerto handle all the events fromregularStoreDataChangedListener. -
Constructor Summary
ConstructorsConstructorDescriptionHelixReadOnlyStoreRepositoryAdapter(HelixReadOnlyZKSharedSystemStoreRepository systemStoreRepository, ReadOnlyStoreRepository regularStoreRepository, String clusterName) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()So far, this function will return the regular Venice stores + the corresponding meta system store.intgetBatchGetLimit(String storeName) Get batch-get limit for the specified storeGet one store by given name from repository.getStoreOrThrow(String storeName) longGet total read quota of all stores.booleanWhether the store exists or not.booleanisReadComputationEnabled(String storeName) Whether computation is enabled for the specified store.voidrefresh()refreshOneStore(String storeName) Selective refresh operation which fetches one store from ZKvoidRegister store data change listener.voidUnregister store data change listener.Methods 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
waitVersion, waitVersion
-
Constructor Details
-
Method Details
-
getStore
Description copied from interface:ReadOnlyStoreRepositoryGet one store by given name from repository.- Specified by:
getStorein interfaceReadOnlyStoreRepository- Parameters:
storeName- name of wanted store.- Returns:
- Store for given name.
-
getStoreOrThrow
- Specified by:
getStoreOrThrowin interfaceReadOnlyStoreRepository- Throws:
VeniceNoStoreException
-
hasStore
Description copied from interface:ReadOnlyStoreRepositoryWhether the store exists or not.- Specified by:
hasStorein interfaceReadOnlyStoreRepository- Parameters:
storeName- store name- Returns:
-
refreshOneStore
Description copied from interface:ReadOnlyStoreRepositorySelective refresh operation which fetches one store from ZK- Specified by:
refreshOneStorein interfaceReadOnlyStoreRepository- Parameters:
storeName- store name- Returns:
- the newly refreshed store
-
getAllStores
So far, this function will return the regular Venice stores + the corresponding meta system store. TODO: if we want to support more system store types in this repo, we need to modify this function accordingly.- Specified by:
getAllStoresin interfaceReadOnlyStoreRepository- Returns:
-
getTotalStoreReadQuota
public long getTotalStoreReadQuota()Description copied from interface:ReadOnlyStoreRepositoryGet total read quota of all stores.- Specified by:
getTotalStoreReadQuotain interfaceReadOnlyStoreRepository
-
registerStoreDataChangedListener
Description copied from interface:ReadOnlyStoreRepositoryRegister store data change listener.- Specified by:
registerStoreDataChangedListenerin interfaceReadOnlyStoreRepository
-
unregisterStoreDataChangedListener
Description copied from interface:ReadOnlyStoreRepositoryUnregister store data change listener.- Specified by:
unregisterStoreDataChangedListenerin interfaceReadOnlyStoreRepository
-
getBatchGetLimit
Description copied from interface:ReadOnlyStoreRepositoryGet batch-get limit for the specified store- Specified by:
getBatchGetLimitin interfaceReadOnlyStoreRepository- Returns:
-
isReadComputationEnabled
Description copied from interface:ReadOnlyStoreRepositoryWhether computation is enabled for the specified store.- Specified by:
isReadComputationEnabledin interfaceReadOnlyStoreRepository- Parameters:
storeName- store name- Returns:
-
refresh
public void refresh()- Specified by:
refreshin interfaceVeniceResource
-
clear
public void clear()- Specified by:
clearin interfaceVeniceResource
-