Package org.elasticsearch.cluster
Class AbstractNamedDiffable<T extends NamedDiffable<T>>
- java.lang.Object
-
- org.elasticsearch.cluster.AbstractNamedDiffable<T>
-
- All Implemented Interfaces:
Diffable<T>
,NamedWriteable
,Writeable
- Direct Known Subclasses:
PersistentTasksCustomMetaData
,RepositoriesMetaData
,RestoreInProgress
,SnapshotDeletionsInProgress
,SnapshotsInProgress
public abstract class AbstractNamedDiffable<T extends NamedDiffable<T>> extends java.lang.Object implements Diffable<T>, NamedWriteable
Abstract diffable object with simple diffs implementation that sends the entire object if object has changed or nothing is object remained the same. Comparing to AbstractDiffable, this class also works with NamedWriteables
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Constructor Summary
Constructors Constructor Description AbstractNamedDiffable()
-
Method Summary
Modifier and Type Method Description Diff<T>
diff(T previousState)
Returns serializable object representing differences between this and previousStateT
get()
static <T extends NamedDiffable<T>>
NamedDiff<T>readDiffFrom(java.lang.Class<? extends T> tClass, java.lang.String name, StreamInput in)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableName
-
-
-
-
Method Detail
-
diff
public Diff<T> diff(T previousState)
Description copied from interface:Diffable
Returns serializable object representing differences between this and previousState- Specified by:
diff
in interfaceDiffable<T extends NamedDiffable<T>>
-
readDiffFrom
public static <T extends NamedDiffable<T>> NamedDiff<T> readDiffFrom(java.lang.Class<? extends T> tClass, java.lang.String name, StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
get
public T get()
-
-