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 TypeMethodDescriptionThe features in all nodes in the cluster.calculateAllNodeFeatures
(Collection<Set<String>> nodeFeatures) boolean
clusterHasFeature
(NodeFeature feature) true
iffeature
is present on all nodes in the cluster.diff
(ClusterFeatures previousState) Returns serializable object representing differences between this and previousStateboolean
int
hashCode()
The features reported by each node in the cluster.static Diff<ClusterFeatures>
static ClusterFeatures
readFrom
(StreamInput in) toString()
Iterator<? extends ToXContent>
toXContentChunked
(ToXContent.Params params) Create an iterator ofToXContent
chunks for a REST response.void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
toXContentChunkedV7
Methods 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. -
allNodeFeatures
The features in 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. -
clusterHasFeature
true
iffeature
is present on all nodes in the cluster.NOTE: This should not be used directly, as it does not read historical features. Please use
FeatureService.clusterHasFeature(org.elasticsearch.cluster.ClusterState, org.elasticsearch.features.NodeFeature)
instead. -
readFrom
- Throws:
IOException
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
diff
Description copied from interface:Diffable
Returns serializable object representing differences between this and previousState- Specified by:
diff
in interfaceDiffable<ClusterFeatures>
-
readDiffFrom
- Throws:
IOException
-
toXContentChunked
Description copied from interface:ChunkedToXContent
Create an iterator ofToXContent
chunks for a REST response. Each chunk is serialized with the sameXContentBuilder
andToXContent.Params
, which is also the same as theToXContent.Params
passed as theparams
argument. 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 alsoChunkedToXContentHelper
for 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:
toXContentChunked
in interfaceChunkedToXContent
- Returns:
- iterator over chunks of
ToXContent
-
toString
-
equals
-
hashCode
public int hashCode()
-