Package org.elasticsearch.cluster
Class NamedDiffableValueSerializer<T extends NamedDiffable<T>>
- java.lang.Object
-
- org.elasticsearch.cluster.DiffableUtils.DiffableValueSerializer<java.lang.String,T>
-
- org.elasticsearch.cluster.NamedDiffableValueSerializer<T>
-
- All Implemented Interfaces:
DiffableUtils.ValueSerializer<java.lang.String,T>
public class NamedDiffableValueSerializer<T extends NamedDiffable<T>> extends DiffableUtils.DiffableValueSerializer<java.lang.String,T>
Value Serializer for named diffables
-
-
Constructor Summary
Constructors Constructor Description NamedDiffableValueSerializer(java.lang.Class<T> tClass)
-
Method Summary
Modifier and Type Method Description T
read(StreamInput in, java.lang.String key)
Reads value from stream.Diff<T>
readDiff(StreamInput in, java.lang.String key)
Reads value as diff from stream if this serializer supports diffable values.boolean
supportsVersion(Diff<T> value, Version version)
Whether this serializer supports the version of the output streamboolean
supportsVersion(T value, Version version)
Whether this serializer supports the version of the output stream-
Methods inherited from class org.elasticsearch.cluster.DiffableUtils.DiffableValueSerializer
diff, supportsDiffableValues, write, writeDiff
-
-
-
-
Constructor Detail
-
NamedDiffableValueSerializer
public NamedDiffableValueSerializer(java.lang.Class<T> tClass)
-
-
Method Detail
-
read
public T read(StreamInput in, java.lang.String key) throws java.io.IOException
Description copied from interface:DiffableUtils.ValueSerializer
Reads value from stream. Reading operation can be made dependent on map key.- Throws:
java.io.IOException
-
supportsVersion
public boolean supportsVersion(Diff<T> value, Version version)
Description copied from interface:DiffableUtils.ValueSerializer
Whether this serializer supports the version of the output stream
-
supportsVersion
public boolean supportsVersion(T value, Version version)
Description copied from interface:DiffableUtils.ValueSerializer
Whether this serializer supports the version of the output stream
-
readDiff
public Diff<T> readDiff(StreamInput in, java.lang.String key) throws java.io.IOException
Description copied from interface:DiffableUtils.ValueSerializer
Reads value as diff from stream if this serializer supports diffable values. Reading operation can be made dependent on map key.- Throws:
java.io.IOException
-
-