Interface ReadOnlyStoreRepository

    • 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.
      • 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: