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
Modifier and TypeClassDescriptionclass
StoreDataChangedListener
to handle all the events fromregularStoreDataChangedListener
. -
Constructor Summary
ConstructorDescriptionHelixReadOnlyStoreRepositoryAdapter
(HelixReadOnlyZKSharedSystemStoreRepository systemStoreRepository, ReadOnlyStoreRepository regularStoreRepository, String clusterName) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
So far, this function will return the regular Venice stores + the corresponding meta system store.int
getBatchGetLimit
(String storeName) Get batch-get limit for the specified storeGet one store by given name from repository.getStoreOrThrow
(String storeName) long
Get total read quota of all stores.boolean
Whether the store exists or not.boolean
isReadComputationEnabled
(String storeName) Whether computation is enabled for the specified store.void
refresh()
refreshOneStore
(String storeName) Selective refresh operation which fetches one store from ZKvoid
Register store data change listener.void
Unregister store data change listener.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
waitVersion, waitVersion
-
Constructor Details
-
Method Details
-
getStore
Description copied from interface:ReadOnlyStoreRepository
Get one store by given name from repository.- Specified by:
getStore
in interfaceReadOnlyStoreRepository
- Parameters:
storeName
- name of wanted store.- Returns:
- Store for given name.
-
getStoreOrThrow
- Specified by:
getStoreOrThrow
in interfaceReadOnlyStoreRepository
- Throws:
VeniceNoStoreException
-
hasStore
Description copied from interface:ReadOnlyStoreRepository
Whether the store exists or not.- Specified by:
hasStore
in interfaceReadOnlyStoreRepository
- Parameters:
storeName
- store name- Returns:
-
refreshOneStore
Description copied from interface:ReadOnlyStoreRepository
Selective refresh operation which fetches one store from ZK- Specified by:
refreshOneStore
in 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:
getAllStores
in interfaceReadOnlyStoreRepository
- Returns:
-
getTotalStoreReadQuota
public long getTotalStoreReadQuota()Description copied from interface:ReadOnlyStoreRepository
Get total read quota of all stores.- Specified by:
getTotalStoreReadQuota
in interfaceReadOnlyStoreRepository
-
registerStoreDataChangedListener
Description copied from interface:ReadOnlyStoreRepository
Register store data change listener.- Specified by:
registerStoreDataChangedListener
in interfaceReadOnlyStoreRepository
-
unregisterStoreDataChangedListener
Description copied from interface:ReadOnlyStoreRepository
Unregister store data change listener.- Specified by:
unregisterStoreDataChangedListener
in interfaceReadOnlyStoreRepository
-
getBatchGetLimit
Description copied from interface:ReadOnlyStoreRepository
Get batch-get limit for the specified store- Specified by:
getBatchGetLimit
in interfaceReadOnlyStoreRepository
- Returns:
-
isReadComputationEnabled
Description copied from interface:ReadOnlyStoreRepository
Whether computation is enabled for the specified store.- Specified by:
isReadComputationEnabled
in interfaceReadOnlyStoreRepository
- Parameters:
storeName
- store name- Returns:
-
refresh
public void refresh()- Specified by:
refresh
in interfaceVeniceResource
-
clear
public void clear()- Specified by:
clear
in interfaceVeniceResource
-