Class DelayableWriteable.Serialized<T extends Writeable>
java.lang.Object
org.elasticsearch.common.io.stream.DelayableWriteable<T>
org.elasticsearch.common.io.stream.DelayableWriteable.Serialized<T>
- All Implemented Interfaces:
Closeable,AutoCloseable,Writeable,org.elasticsearch.core.Releasable
- Enclosing class:
- DelayableWriteable<T extends Writeable>
public static class DelayableWriteable.Serialized<T extends Writeable>
extends DelayableWriteable<T>
A
Writeable stored in serialized form backed by a ReleasableBytesReference. Once an instance is no longer used its
backing memory must be manually released by invoking close() on it.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.common.io.stream.DelayableWriteable
DelayableWriteable.Serialized<T extends Writeable>Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Method Summary
Modifier and TypeMethodDescriptionasSerialized(Writeable.Reader<T> reader, NamedWriteableRegistry registry)Returns a DelayableWriteable that stores its contents in serialized form.voidclose()expand()Expands the innerWriteableto its original representation and returns itlongReturns the serialized size of the innerWriteable.voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.common.io.stream.DelayableWriteable
delayed, getSerializedSize, referencing
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Throws:
IOException
-
expand
Description copied from class:DelayableWriteableExpands the innerWriteableto its original representation and returns it- Specified by:
expandin classDelayableWriteable<T extends Writeable>
-
asSerialized
public DelayableWriteable.Serialized<T> asSerialized(Writeable.Reader<T> reader, NamedWriteableRegistry registry)Description copied from class:DelayableWriteableReturns a DelayableWriteable that stores its contents in serialized form.- Specified by:
asSerializedin classDelayableWriteable<T extends Writeable>
-
getSerializedSize
public long getSerializedSize()Description copied from class:DelayableWriteableReturns the serialized size of the innerWriteable.- Specified by:
getSerializedSizein classDelayableWriteable<T extends Writeable>
-
close
public void close()
-