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 Details

    • getStore

      Store getStore(String storeName)
      Get one store by given name from repository.
      Parameters:
      storeName - name of wanted store.
      Returns:
      Store for given name.
    • getStoreOrThrow

      Store getStoreOrThrow(String storeName) throws VeniceNoStoreException
      Throws:
      VeniceNoStoreException
    • waitVersion

      default Pair<Store,Version> waitVersion(String storeName, int versionNumber, 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(String storeName, int versionNumber, Duration timeout, long delayMs)
    • hasStore

      boolean hasStore(String storeName)
      Whether the store exists or not.
      Parameters:
      storeName - store name
      Returns:
    • refreshOneStore

      Store refreshOneStore(String storeName)
      Selective refresh operation which fetches one store from ZK
      Parameters:
      storeName - store name
      Returns:
      the newly refreshed store
    • getAllStores

      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(String storeName)
      Get batch-get limit for the specified store
      Parameters:
      storeName -
      Returns:
    • isReadComputationEnabled

      boolean isReadComputationEnabled(String storeName)
      Whether computation is enabled for the specified store.
      Parameters:
      storeName - store name
      Returns: