Package org.elasticsearch.cluster
Class DiffableUtils.ImmutableOpenMapDiff<K,T>
java.lang.Object
org.elasticsearch.cluster.DiffableUtils.MapDiff<K,T,ImmutableOpenMap<K,T>>
org.elasticsearch.cluster.DiffableUtils.ImmutableOpenMapDiff<K,T>
- Type Parameters:
T
- the object type
- All Implemented Interfaces:
Diff<ImmutableOpenMap<K,T>>
,Writeable
- Enclosing class:
- DiffableUtils
public static class DiffableUtils.ImmutableOpenMapDiff<K,T>
extends DiffableUtils.MapDiff<K,T,ImmutableOpenMap<K,T>>
Represents differences between two ImmutableOpenMap of (possibly diffable) objects
-
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 class org.elasticsearch.cluster.DiffableUtils.MapDiff
deletes, diffs, keySerializer, upserts, valueSerializer
-
Constructor Summary
ModifierConstructorDescriptionImmutableOpenMapDiff(ImmutableOpenMap<K,T> before, ImmutableOpenMap<K,T> after, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.ValueSerializer<K,T> valueSerializer)
protected
ImmutableOpenMapDiff(StreamInput in, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.ValueSerializer<K,T> valueSerializer)
-
Method Summary
Modifier and TypeMethodDescriptionapply(ImmutableOpenMap<K,T> map)
Applies difference to the specified part and returns the resulted partwithKeyRemoved(K key)
Returns a new diff map with the given key removed, does not modify the invoking instance.Methods inherited from class org.elasticsearch.cluster.DiffableUtils.MapDiff
getDeletes, getDiffs, getUpserts, writeTo
-
Constructor Details
-
ImmutableOpenMapDiff
protected ImmutableOpenMapDiff(StreamInput in, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.ValueSerializer<K,T> valueSerializer) throws IOException- Throws:
IOException
-
ImmutableOpenMapDiff
public ImmutableOpenMapDiff(ImmutableOpenMap<K,T> before, ImmutableOpenMap<K,T> after, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.ValueSerializer<K,T> valueSerializer)
-
-
Method Details
-
withKeyRemoved
Returns a new diff map with the given key removed, does not modify the invoking instance. If the key does not exist in the diff map, the same instance is returned. -
apply
Description copied from interface:Diff
Applies difference to the specified part and returns the resulted part
-