Interface MultiClusterSupport<T>

    • Method Detail

      • size

        int size()
        Returns:
        the total number of clusters
      • forEach

        void forEach​(java.util.function.BiConsumer<java.lang.String,​T> action)
        Iterate through all values
        Parameters:
        action - function to consume the values
      • getValueOrNull

        @Nullable
        T getValueOrNull​(@Nullable
                         java.lang.String clusterId)
        Look up a value based on clusterId
        Parameters:
        clusterId - cluster id
        Returns:
        the value of type T associated with the clusterId, or null if not found
      • getValueOrThrow

        @NotNull
        default T getValueOrThrow​(@Nullable
                                  java.lang.String clusterId)
                           throws java.util.NoSuchElementException
        Look up a value based on clusterId
        Parameters:
        clusterId - cluster id
        Returns:
        the value of type T associated with the clusterId, or throws NoSuchElementException
        Throws:
        java.util.NoSuchElementException - when no value is found