java.lang.Object
org.elasticsearch.cluster.ClusterFeatures
- All Implemented Interfaces:
Diffable<ClusterFeatures>,Writeable,ChunkedToXContent,ChunkedToXContentObject
public class ClusterFeatures
extends Object
implements Diffable<ClusterFeatures>, ChunkedToXContentObject
Stores information on what features are present throughout the cluster
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateAllNodeFeatures(Collection<Set<String>> nodeFeatures) booleanclusterHasFeature(DiscoveryNodes nodes, NodeFeature feature) trueiffeatureis present on all nodes in the cluster.diff(ClusterFeatures previousState) Returns serializable object representing differences between this and previousStatebooleanstatic booleanReturnstrueifnodecan have assumed features.static booleanReturnstrueif one or more nodes innodescan have assumed features.inthashCode()The features reported by each node in the cluster.static Diff<ClusterFeatures> static ClusterFeaturesreadFrom(StreamInput in) toString()Iterator<? extends ToXContent> toXContentChunked(ToXContent.Params params) Create an iterator ofToXContentchunks for a REST response.voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
toXContentChunked, toXContentChunkedV8Methods inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContentObject
isFragment
-
Constructor Details
-
ClusterFeatures
-
-
Method Details
-
calculateAllNodeFeatures
-
nodeFeatures
The features reported by each node in the cluster.NOTE: This should not be used directly. Please use
FeatureService.clusterHasFeature(org.elasticsearch.cluster.ClusterState, org.elasticsearch.features.NodeFeature)instead. -
featuresCanBeAssumedForNode
Returnstrueifnodecan have assumed features.- See Also:
-
featuresCanBeAssumedForNodes
Returnstrueif one or more nodes innodescan have assumed features.- See Also:
-
clusterHasFeature
trueiffeatureis present on all nodes in the cluster.NOTE: This should not be used directly. Please use
FeatureService.clusterHasFeature(org.elasticsearch.cluster.ClusterState, org.elasticsearch.features.NodeFeature)instead. -
readFrom
- Throws:
IOException
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
diff
Description copied from interface:DiffableReturns serializable object representing differences between this and previousState- Specified by:
diffin interfaceDiffable<ClusterFeatures>
-
readDiffFrom
- Throws:
IOException
-
toXContentChunked
Description copied from interface:ChunkedToXContentCreate an iterator ofToXContentchunks for a REST response. Each chunk is serialized with the sameXContentBuilderandToXContent.Params, which is also the same as theToXContent.Paramspassed as theparamsargument. For best results, all chunks should beO(1)size. The last chunk in the iterator must always yield at least one byte of output. See alsoChunkedToXContentHelperfor some handy utilities.Note that chunked response bodies cannot send deprecation warning headers once transmission has started, so implementations must check for deprecated feature use before returning.
- Specified by:
toXContentChunkedin interfaceChunkedToXContent- Returns:
- iterator over chunks of
ToXContent
-
toString
-
equals
-
hashCode
public int hashCode()
-