Package com.linkedin.venice.meta
Interface ReadOnlyStoreRepository
-
- All Superinterfaces:
VeniceResource
- All Known Subinterfaces:
ReadWriteStoreRepository
,SubscriptionBasedReadOnlyStoreRepository
- All Known Implementing Classes:
CachedReadOnlyStoreRepository
,HelixReadOnlyStoreRepository
,HelixReadOnlyStoreRepositoryAdapter
,HelixReadOnlyZKSharedSystemStoreRepository
,HelixReadWriteStoreRepository
,HelixReadWriteStoreRepositoryAdapter
,NativeMetadataRepository
,SharedHelixReadOnlyZKSharedSystemStoreRepository
,SubscriptionBasedStoreRepository
,ThinClientMetaStoreBasedRepository
public interface ReadOnlyStoreRepository extends VeniceResource
Interface defined readonly operations to access stores.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.List<Store>
getAllStores()
Get all stores in the current repositoryint
getBatchGetLimit(java.lang.String storeName)
Get batch-get limit for the specified storeStore
getStore(java.lang.String storeName)
Get one store by given name from repository.Store
getStoreOrThrow(java.lang.String storeName)
long
getTotalStoreReadQuota()
Get total read quota of all stores.boolean
hasStore(java.lang.String storeName)
Whether the store exists or not.boolean
isReadComputationEnabled(java.lang.String storeName)
Whether computation is enabled for the specified store.Store
refreshOneStore(java.lang.String storeName)
Selective refresh operation which fetches one store from ZKvoid
registerStoreDataChangedListener(StoreDataChangedListener listener)
Register store data change listener.void
unregisterStoreDataChangedListener(StoreDataChangedListener listener)
Unregister store data change listener.default Pair<Store,Version>
waitVersion(java.lang.String storeName, int versionNumber, java.time.Duration timeout)
Wait for a specified store/version to appear in the Store Repository and retrieve them.default Pair<Store,Version>
waitVersion(java.lang.String storeName, int versionNumber, java.time.Duration timeout, long delayMs)
-
Methods inherited from interface com.linkedin.venice.VeniceResource
clear, refresh
-
-
-
-
Method Detail
-
getStore
Store getStore(java.lang.String storeName)
Get one store by given name from repository.- Parameters:
storeName
- name of wanted store.- Returns:
- Store for given name.
-
getStoreOrThrow
Store getStoreOrThrow(java.lang.String storeName) throws VeniceNoStoreException
- Throws:
VeniceNoStoreException
-
waitVersion
default Pair<Store,Version> waitVersion(java.lang.String storeName, int versionNumber, java.time.Duration timeout)
Wait for a specified store/version to appear in the Store Repository and retrieve them.- Parameters:
storeName
- Store name to wait for.versionNumber
- Version number to wait for.timeout
- Maximum wait time allowed before giving up.- Returns:
- (store, version) pair on success. (store, null) if store exists, but version still isn't after waiting for allowed time. (null, null) if store still doesn't exit after waiting for allowed time.
-
waitVersion
default Pair<Store,Version> waitVersion(java.lang.String storeName, int versionNumber, java.time.Duration timeout, long delayMs)
-
hasStore
boolean hasStore(java.lang.String storeName)
Whether the store exists or not.- Parameters:
storeName
- store name- Returns:
-
refreshOneStore
Store refreshOneStore(java.lang.String storeName)
Selective refresh operation which fetches one store from ZK- Parameters:
storeName
- store name- Returns:
- the newly refreshed store
-
getAllStores
java.util.List<Store> getAllStores()
Get all stores in the current repository- Returns:
-
getTotalStoreReadQuota
long getTotalStoreReadQuota()
Get total read quota of all stores.
-
registerStoreDataChangedListener
void registerStoreDataChangedListener(StoreDataChangedListener listener)
Register store data change listener.- Parameters:
listener
-
-
unregisterStoreDataChangedListener
void unregisterStoreDataChangedListener(StoreDataChangedListener listener)
Unregister store data change listener.- Parameters:
listener
-
-
getBatchGetLimit
int getBatchGetLimit(java.lang.String storeName)
Get batch-get limit for the specified store- Parameters:
storeName
-- Returns:
-
isReadComputationEnabled
boolean isReadComputationEnabled(java.lang.String storeName)
Whether computation is enabled for the specified store.- Parameters:
storeName
- store name- Returns:
-
-