Module org.elasticsearch.server
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,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.Deduplicator, 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 uncompressed serialized size of the innerWriteable: the byte count it would have if written to a plainStreamOutputwithout compression.booleanvoidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.common.io.stream.DelayableWriteable
delayed, getUncompressedSerializedSize, referencing, referencing, wrapWithDeduplicatorStreamInput
-
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>
-
isSerialized
public boolean isSerialized()Description copied from class:DelayableWriteable- Specified by:
isSerializedin classDelayableWriteable<T extends Writeable>
-
getUncompressedSerializedSize
public long getUncompressedSerializedSize()Description copied from class:DelayableWriteableReturns the uncompressed serialized size of the innerWriteable: the byte count it would have if written to a plainStreamOutputwithout compression.- Specified by:
getUncompressedSerializedSizein classDelayableWriteable<T extends Writeable>
-
close
public void close()
-