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.void
close()
expand()
Expands the innerWriteable
to its original representation and returns itlong
Returns the serialized size of the innerWriteable
.void
writeTo(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:Writeable
Write this into the StreamOutput.- Throws:
IOException
-
expand
Description copied from class:DelayableWriteable
Expands the innerWriteable
to its original representation and returns it- Specified by:
expand
in classDelayableWriteable<T extends Writeable>
-
asSerialized
public DelayableWriteable.Serialized<T> asSerialized(Writeable.Reader<T> reader, NamedWriteableRegistry registry)Description copied from class:DelayableWriteable
Returns a DelayableWriteable that stores its contents in serialized form.- Specified by:
asSerialized
in classDelayableWriteable<T extends Writeable>
-
getSerializedSize
public long getSerializedSize()Description copied from class:DelayableWriteable
Returns the serialized size of the innerWriteable
.- Specified by:
getSerializedSize
in classDelayableWriteable<T extends Writeable>
-
close
public void close()
-