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
Constructors Modifier Constructor Description ImmutableOpenMapDiff(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 Type Method Description ImmutableOpenMap<K,T>
apply(ImmutableOpenMap<K,T> map)
Applies difference to the specified part and returns the resulted partDiffableUtils.ImmutableOpenMapDiff<K,T>
withKeyRemoved(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 Detail
-
ImmutableOpenMapDiff
protected ImmutableOpenMapDiff(StreamInput in, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.ValueSerializer<K,T> valueSerializer) throws java.io.IOException
- Throws:
java.io.IOException
-
ImmutableOpenMapDiff
public ImmutableOpenMapDiff(ImmutableOpenMap<K,T> before, ImmutableOpenMap<K,T> after, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.ValueSerializer<K,T> valueSerializer)
-
-
Method Detail
-
withKeyRemoved
public DiffableUtils.ImmutableOpenMapDiff<K,T> withKeyRemoved(K key)
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
public ImmutableOpenMap<K,T> apply(ImmutableOpenMap<K,T> map)
Description copied from interface:Diff
Applies difference to the specified part and returns the resulted part
-
-