Interface ClusterStateSupplier

All Superinterfaces:
Supplier<Optional<ClusterState>>
All Known Implementing Classes:
SafeClusterStateSupplier

public interface ClusterStateSupplier extends Supplier<Optional<ClusterState>>
Utility to access ClusterState only when it is "ready", with a fallback if it's not. The definition of "ready" is left to the class implementations.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T> T
    withCurrentClusterState(Function<ClusterState,T> clusterStateFunction, T fallbackIfNotReady)
     

    Methods inherited from interface java.util.function.Supplier

    get
  • Method Details

    • withCurrentClusterState

      default <T> T withCurrentClusterState(Function<ClusterState,T> clusterStateFunction, T fallbackIfNotReady)