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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
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 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
-