Package org.elasticsearch.cluster
Class DiffableUtils
java.lang.Object
org.elasticsearch.cluster.DiffableUtils
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
DiffableUtils.DiffableValueReader<K,V extends Diffable<V>>
Implementation of the ValueSerializer that wraps value and diff readers.static class
DiffableUtils.DiffableValueSerializer<K,V extends Diffable<V>>
Serializer for Diffable map values.static class
Represents differences between two ImmutableOpenMap of (possibly diffable) objectsstatic interface
Provides read and write operations to serialize keys of mapstatic class
Represents differences between two maps of objects and is used as base class for different map implementations.static class
Serializer for non-diffable map valuesstatic class
Implementation of ValueSerializer that serializes immutable setsstatic interface
Provides read and write operations to serialize map values. -
Method Summary
Modifier and TypeMethodDescriptionstatic <K, T extends Diffable<T>>
DiffableUtils.MapDiff<K,T,Map<K,T>>diff(Map<K,T> before, Map<K,T> after, DiffableUtils.KeySerializer<K> keySerializer)
Calculates diff between two Maps of Diffable objects.static <K, T> DiffableUtils.MapDiff<K,T,Map<K,T>>
diff(Map<K,T> before, Map<K,T> after, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.ValueSerializer<K,T> valueSerializer)
Calculates diff between two Maps of non-diffable objectsstatic <T extends Diffable<T>>
DiffableUtils.MapDiff<Integer,T,ImmutableOpenIntMap<T>>diff(ImmutableOpenIntMap<T> before, ImmutableOpenIntMap<T> after, DiffableUtils.KeySerializer<Integer> keySerializer)
Calculates diff between two ImmutableOpenIntMaps of Diffable objectsstatic <T> DiffableUtils.MapDiff<Integer,T,ImmutableOpenIntMap<T>>
diff(ImmutableOpenIntMap<T> before, ImmutableOpenIntMap<T> after, DiffableUtils.KeySerializer<Integer> keySerializer, DiffableUtils.ValueSerializer<Integer,T> valueSerializer)
Calculates diff between two ImmutableOpenIntMaps of non-diffable objectsstatic <K, T extends Diffable<T>>
DiffableUtils.MapDiff<K,T,ImmutableOpenMap<K,T>>diff(ImmutableOpenMap<K,T> before, ImmutableOpenMap<K,T> after, DiffableUtils.KeySerializer<K> keySerializer)
Calculates diff between two ImmutableOpenMaps of Diffable objectsstatic <K, T> DiffableUtils.MapDiff<K,T,ImmutableOpenMap<K,T>>
diff(ImmutableOpenMap<K,T> before, ImmutableOpenMap<K,T> after, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.ValueSerializer<K,T> valueSerializer)
Calculates diff between two ImmutableOpenMaps of non-diffable objectsstatic DiffableUtils.KeySerializer<Integer>
Returns a map key serializer for Integer keys.static DiffableUtils.KeySerializer<String>
Returns a map key serializer for String keysstatic DiffableUtils.KeySerializer<Integer>
Returns a map key serializer for Integer keys.static <T> DiffableUtils.MapDiff<Integer,T,ImmutableOpenIntMap<T>>
readImmutableOpenIntMapDiff(StreamInput in, DiffableUtils.KeySerializer<Integer> keySerializer, DiffableUtils.ValueSerializer<Integer,T> valueSerializer)
Loads an object that represents difference between two ImmutableOpenMapsstatic <T extends Diffable<T>>
DiffableUtils.MapDiff<Integer,T,ImmutableOpenIntMap<T>>readImmutableOpenIntMapDiff(StreamInput in, DiffableUtils.KeySerializer<Integer> keySerializer, Writeable.Reader<T> reader, Writeable.Reader<Diff<T>> diffReader)
Loads an object that represents difference between two ImmutableOpenIntMaps of Diffable objects using Diffable proto objectstatic <K, T extends Diffable<T>>
DiffableUtils.MapDiff<K,T,ImmutableOpenMap<K,T>>readImmutableOpenMapDiff(StreamInput in, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.DiffableValueReader<K,T> diffableValueReader)
Loads an object that represents difference between two ImmutableOpenMaps of Diffable objects using Diffable proto objectstatic <K, T> DiffableUtils.MapDiff<K,T,ImmutableOpenMap<K,T>>
readImmutableOpenMapDiff(StreamInput in, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.ValueSerializer<K,T> valueSerializer)
Loads an object that represents difference between two ImmutableOpenMapsstatic <K, T> DiffableUtils.MapDiff<K,T,Map<K,T>>
readJdkMapDiff(StreamInput in, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.ValueSerializer<K,T> valueSerializer)
Loads an object that represents difference between two Maps of Diffable objectsstatic <K, T extends Diffable<T>>
DiffableUtils.MapDiff<K,T,Map<K,T>>readJdkMapDiff(StreamInput in, DiffableUtils.KeySerializer<K> keySerializer, Writeable.Reader<T> reader, Writeable.Reader<Diff<T>> diffReader)
Loads an object that represents difference between two Maps of Diffable objects using Diffable proto object
-
Method Details
-
getStringKeySerializer
Returns a map key serializer for String keys -
getIntKeySerializer
Returns a map key serializer for Integer keys. Encodes as Int. -
getVIntKeySerializer
Returns a map key serializer for Integer keys. Encodes as VInt. -
diff
public static <K, T extends Diffable<T>> DiffableUtils.MapDiff<K,T,ImmutableOpenMap<K,T>> diff(ImmutableOpenMap<K,T> before, ImmutableOpenMap<K,T> after, DiffableUtils.KeySerializer<K> keySerializer)Calculates diff between two ImmutableOpenMaps of Diffable objects -
diff
public static <K, T> DiffableUtils.MapDiff<K,T,ImmutableOpenMap<K,T>> diff(ImmutableOpenMap<K,T> before, ImmutableOpenMap<K,T> after, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.ValueSerializer<K,T> valueSerializer)Calculates diff between two ImmutableOpenMaps of non-diffable objects -
diff
public static <T extends Diffable<T>> DiffableUtils.MapDiff<Integer,T,ImmutableOpenIntMap<T>> diff(ImmutableOpenIntMap<T> before, ImmutableOpenIntMap<T> after, DiffableUtils.KeySerializer<Integer> keySerializer)Calculates diff between two ImmutableOpenIntMaps of Diffable objects -
diff
public static <T> DiffableUtils.MapDiff<Integer,T,ImmutableOpenIntMap<T>> diff(ImmutableOpenIntMap<T> before, ImmutableOpenIntMap<T> after, DiffableUtils.KeySerializer<Integer> keySerializer, DiffableUtils.ValueSerializer<Integer,T> valueSerializer)Calculates diff between two ImmutableOpenIntMaps of non-diffable objects -
diff
public static <K, T extends Diffable<T>> DiffableUtils.MapDiff<K,T,Map<K,T>> diff(Map<K,T> before, Map<K,T> after, DiffableUtils.KeySerializer<K> keySerializer)Calculates diff between two Maps of Diffable objects. -
diff
public static <K, T> DiffableUtils.MapDiff<K,T,Map<K,T>> diff(Map<K,T> before, Map<K,T> after, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.ValueSerializer<K,T> valueSerializer)Calculates diff between two Maps of non-diffable objects -
readImmutableOpenMapDiff
public static <K, T> DiffableUtils.MapDiff<K,T,ImmutableOpenMap<K,T>> readImmutableOpenMapDiff(StreamInput in, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.ValueSerializer<K,T> valueSerializer) throws IOExceptionLoads an object that represents difference between two ImmutableOpenMaps- Throws:
IOException
-
readImmutableOpenIntMapDiff
public static <T> DiffableUtils.MapDiff<Integer,T,ImmutableOpenIntMap<T>> readImmutableOpenIntMapDiff(StreamInput in, DiffableUtils.KeySerializer<Integer> keySerializer, DiffableUtils.ValueSerializer<Integer,T> valueSerializer) throws IOExceptionLoads an object that represents difference between two ImmutableOpenMaps- Throws:
IOException
-
readJdkMapDiff
public static <K, T> DiffableUtils.MapDiff<K,T,Map<K,T>> readJdkMapDiff(StreamInput in, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.ValueSerializer<K,T> valueSerializer) throws IOExceptionLoads an object that represents difference between two Maps of Diffable objects- Throws:
IOException
-
readImmutableOpenMapDiff
public static <K, T extends Diffable<T>> DiffableUtils.MapDiff<K,T,ImmutableOpenMap<K,T>> readImmutableOpenMapDiff(StreamInput in, DiffableUtils.KeySerializer<K> keySerializer, DiffableUtils.DiffableValueReader<K,T> diffableValueReader) throws IOExceptionLoads an object that represents difference between two ImmutableOpenMaps of Diffable objects using Diffable proto object- Throws:
IOException
-
readImmutableOpenIntMapDiff
public static <T extends Diffable<T>> DiffableUtils.MapDiff<Integer,T,ImmutableOpenIntMap<T>> readImmutableOpenIntMapDiff(StreamInput in, DiffableUtils.KeySerializer<Integer> keySerializer, Writeable.Reader<T> reader, Writeable.Reader<Diff<T>> diffReader) throws IOExceptionLoads an object that represents difference between two ImmutableOpenIntMaps of Diffable objects using Diffable proto object- Throws:
IOException
-
readJdkMapDiff
public static <K, T extends Diffable<T>> DiffableUtils.MapDiff<K,T,Map<K,T>> readJdkMapDiff(StreamInput in, DiffableUtils.KeySerializer<K> keySerializer, Writeable.Reader<T> reader, Writeable.Reader<Diff<T>> diffReader) throws IOExceptionLoads an object that represents difference between two Maps of Diffable objects using Diffable proto object- Throws:
IOException
-