Class FeatureService

java.lang.Object
org.elasticsearch.features.FeatureService

public class FeatureService extends Object
Manages information on the features supported by nodes in the cluster. For more information, see FeatureSpecification.
  • Field Details

    • TEST_FEATURES_ENABLED

      public static final NodeFeature TEST_FEATURES_ENABLED
  • Constructor Details

    • FeatureService

      public FeatureService(List<? extends FeatureSpecification> specs)
      Creates a new FeatureService, reporting all the features declared in specs as the local node's supported feature set
  • Method Details

    • getNodeFeatures

      public Map<String,NodeFeature> getNodeFeatures()
      The features supported by this node.
      Returns:
      Map of feature-id to its declaring NodeFeature object.
    • featuresCanBeAssumedForNode

      public boolean featuresCanBeAssumedForNode(DiscoveryNode node)
      Returns true if node can have assumed features.
    • featuresCanBeAssumedForNodes

      public boolean featuresCanBeAssumedForNodes(DiscoveryNodes nodes)
      Returns true if one or more nodes in nodes can have assumed features.
    • clusterHasFeature

      public boolean clusterHasFeature(ClusterState state, NodeFeature feature)
      Returns true if all nodes in state support feature feature.