Package io.servicetalk.serialization.api
Class DefaultSerializer
- java.lang.Object
-
- io.servicetalk.serialization.api.DefaultSerializer
-
- All Implemented Interfaces:
Serializer
public final class DefaultSerializer extends java.lang.Object implements Serializer
Default implementation forSerializer.
-
-
Constructor Summary
Constructors Constructor Description DefaultSerializer(SerializationProvider serializationProvider)New instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Publisher<T>deserialize(Publisher<Buffer> source, TypeHolder<T> typeHolder)Applies a deserializer on the passedPublisherto convert into aPublisherof deserialized instances ofSerializer.<T> Publisher<T>deserialize(Publisher<Buffer> source, java.lang.Class<T> type)Applies a deserializer on the passedPublisherto convert into aPublisherof deserialized instances ofSerializer.<T> BlockingIterable<T>deserialize(BlockingIterable<Buffer> source, TypeHolder<T> typeHolder)Applies a deserializer on the passedBlockingIterableto convert into aBlockingIterableof deserialized instances ofSerializer.<T> BlockingIterable<T>deserialize(BlockingIterable<Buffer> source, java.lang.Class<T> type)Applies a deserializer on the passedBlockingIterableto convert into aIterableof deserialized instances ofSerializer.<T> CloseableIterable<T>deserialize(java.lang.Iterable<Buffer> source, TypeHolder<T> typeHolder)Applies a deserializer on the passedIterableto convert into aIterableof deserialized instances ofSerializer.<T> CloseableIterable<T>deserialize(java.lang.Iterable<Buffer> source, java.lang.Class<T> type)Applies a deserializer on the passedIterableto convert into aCloseableIterableof deserialized instances ofSerializer.<T> CloseableIterable<T>deserializeAggregated(Buffer serializedData, TypeHolder<T> typeHolder)Deserializes the passed encodedBufferto zero or more instances ofSerializer.<T> CloseableIterable<T>deserializeAggregated(Buffer serializedData, java.lang.Class<T> type)Deserializes the passed encodedBufferto one or more instances ofSerializer.<T> TdeserializeAggregatedSingle(Buffer serializedData, TypeHolder<T> typeHolder)Deserializes the passed encodedBufferto a single instance ofSerializer.<T> TdeserializeAggregatedSingle(Buffer serializedData, java.lang.Class<T> type)Deserializes the passed encodedBufferto a single instance ofSerializer.<T> Publisher<Buffer>serialize(Publisher<T> source, BufferAllocator allocator, TypeHolder<T> typeHolder)Transforms the passedPublishersuch that each contained element of typeSerializeris serialized into aBuffer.<T> Publisher<Buffer>serialize(Publisher<T> source, BufferAllocator allocator, TypeHolder<T> typeHolder, java.util.function.IntUnaryOperator bytesEstimator)Transforms the passedPublishersuch that each contained element of typeSerializeris serialized into aBuffer.<T> Publisher<Buffer>serialize(Publisher<T> source, BufferAllocator allocator, java.lang.Class<T> type)Transforms the passedPublishersuch that each contained element of typeSerializeris serialized into aBuffer.<T> Publisher<Buffer>serialize(Publisher<T> source, BufferAllocator allocator, java.lang.Class<T> type, java.util.function.IntUnaryOperator bytesEstimator)Transforms the passedPublishersuch that each contained element of typeSerializeris serialized into aBuffer.<T> BlockingIterable<Buffer>serialize(BlockingIterable<T> source, BufferAllocator allocator, TypeHolder<T> typeHolder)Transforms the passedBlockingIterablesuch that each contained element of typeSerializeris serialized into aBuffer.<T> BlockingIterable<Buffer>serialize(BlockingIterable<T> source, BufferAllocator allocator, TypeHolder<T> typeHolder, java.util.function.IntUnaryOperator bytesEstimator)Transforms the passedBlockingIterablesuch that each contained element of typeSerializeris serialized into aBuffer.<T> BlockingIterable<Buffer>serialize(BlockingIterable<T> source, BufferAllocator allocator, java.lang.Class<T> type)Transforms the passedBlockingIterablesuch that each contained element of typeSerializeris serialized into aBuffer.<T> BlockingIterable<Buffer>serialize(BlockingIterable<T> source, BufferAllocator allocator, java.lang.Class<T> type, java.util.function.IntUnaryOperator bytesEstimator)Transforms the passedBlockingIterablesuch that each contained element of typeSerializeris serialized into aBuffer.<T> java.lang.Iterable<Buffer>serialize(java.lang.Iterable<T> source, BufferAllocator allocator, TypeHolder<T> typeHolder)Transforms the passedIterablesuch that each contained element of typeSerializeris serialized into aBuffer.<T> java.lang.Iterable<Buffer>serialize(java.lang.Iterable<T> source, BufferAllocator allocator, TypeHolder<T> typeHolder, java.util.function.IntUnaryOperator bytesEstimator)Transforms the passedIterablesuch that each contained element of typeSerializeris serialized into aBuffer.<T> java.lang.Iterable<Buffer>serialize(java.lang.Iterable<T> source, BufferAllocator allocator, java.lang.Class<T> type)Transforms the passedIterablesuch that each contained element of typeSerializeris serialized into aBuffer.<T> java.lang.Iterable<Buffer>serialize(java.lang.Iterable<T> source, BufferAllocator allocator, java.lang.Class<T> type, java.util.function.IntUnaryOperator bytesEstimator)Transforms the passedIterablesuch that each contained element of typeSerializeris serialized into aBuffer.<T> voidserialize(T toSerialize, Buffer destination)Serializes the passed objecttoSerializeto the passedBuffer.<T> Bufferserialize(T toSerialize, BufferAllocator allocator)Serializes the passed objecttoSerializeto the returnedBuffer.<T> Bufferserialize(T toSerialize, BufferAllocator allocator, int bytesEstimate)Serializes the passed objecttoSerializeto the returnedBuffer.
-
-
-
Constructor Detail
-
DefaultSerializer
public DefaultSerializer(SerializationProvider serializationProvider)
New instance.- Parameters:
serializationProvider-SerializationProviderto use.
-
-
Method Detail
-
serialize
public <T> Publisher<Buffer> serialize(Publisher<T> source, BufferAllocator allocator, java.lang.Class<T> type)
Description copied from interface:SerializerTransforms the passedPublishersuch that each contained element of typeSerializeris serialized into aBuffer.- Specified by:
serializein interfaceSerializer- Type Parameters:
T- The data type to serialize.- Parameters:
source-Publishercontaining objects to serialize.allocator- TheBufferAllocatorused to allocateBuffers.type- The class forSerializer, the object to be serialized.- Returns:
- A transformed
Publishersuch that each contained element in the originalPublisheris transformed from typeSerializerto aBuffer.
-
serialize
public <T> java.lang.Iterable<Buffer> serialize(java.lang.Iterable<T> source, BufferAllocator allocator, java.lang.Class<T> type)
Description copied from interface:SerializerTransforms the passedIterablesuch that each contained element of typeSerializeris serialized into aBuffer.- Specified by:
serializein interfaceSerializer- Type Parameters:
T- The data type to serialize.- Parameters:
source-Iterablecontaining objects to serialize.allocator- TheBufferAllocatorused to allocateBuffers.type- The class forSerializer, the object to be serialized.- Returns:
- A transformed
Iterablesuch that each contained element in the originalIterableis transformed from typeSerializerto aBuffer.
-
serialize
public <T> BlockingIterable<Buffer> serialize(BlockingIterable<T> source, BufferAllocator allocator, java.lang.Class<T> type)
Description copied from interface:SerializerTransforms the passedBlockingIterablesuch that each contained element of typeSerializeris serialized into aBuffer.- Specified by:
serializein interfaceSerializer- Type Parameters:
T- The data type to serialize.- Parameters:
source-BlockingIterablecontaining objects to serialize.allocator- TheBufferAllocatorused to allocateBuffers.type- The class forSerializer, the object to be serialized.- Returns:
- A transformed
BlockingIterablesuch that each contained element in the originalBlockingIterableis transformed from typeSerializerto aBuffer.
-
serialize
public <T> Publisher<Buffer> serialize(Publisher<T> source, BufferAllocator allocator, java.lang.Class<T> type, java.util.function.IntUnaryOperator bytesEstimator)
Description copied from interface:SerializerTransforms the passedPublishersuch that each contained element of typeSerializeris serialized into aBuffer.- Specified by:
serializein interfaceSerializer- Type Parameters:
T- The data type to serialize.- Parameters:
source-Publishercontaining objects to serialize.allocator- TheBufferAllocatorused to allocateBuffers.type- The class forSerializer, the object to be serialized.bytesEstimator- AnIntUnaryOperatorthat given the last serialized size in bytes, estimates the size of the next object to be serialized in bytes.- Returns:
- A transformed
Publishersuch that each contained element in the originalPublisheris transformed from typeSerializerto aBuffer.
-
serialize
public <T> java.lang.Iterable<Buffer> serialize(java.lang.Iterable<T> source, BufferAllocator allocator, java.lang.Class<T> type, java.util.function.IntUnaryOperator bytesEstimator)
Description copied from interface:SerializerTransforms the passedIterablesuch that each contained element of typeSerializeris serialized into aBuffer.- Specified by:
serializein interfaceSerializer- Type Parameters:
T- The data type to serialize.- Parameters:
source-Iterablecontaining objects to serialize.allocator- TheBufferAllocatorused to allocateBuffers.type- The class forSerializer, the object to be serialized.bytesEstimator- AnIntUnaryOperatorthat given the last serialized size in bytes, estimates the size of the next object to be serialized in bytes.- Returns:
- A transformed
Iterablesuch that each contained element in the originalIterableis transformed from typeSerializerto aBuffer.
-
serialize
public <T> BlockingIterable<Buffer> serialize(BlockingIterable<T> source, BufferAllocator allocator, java.lang.Class<T> type, java.util.function.IntUnaryOperator bytesEstimator)
Description copied from interface:SerializerTransforms the passedBlockingIterablesuch that each contained element of typeSerializeris serialized into aBuffer.- Specified by:
serializein interfaceSerializer- Type Parameters:
T- The data type to serialize. size of the next object to be serialized in bytes.- Parameters:
source-BlockingIterablecontaining objects to serialize.allocator- TheBufferAllocatorused to allocateBuffers.type- The class forSerializer, the object to be serialized.bytesEstimator- AnIntUnaryOperatorthat given the last serialized size in bytes, estimates the- Returns:
- A transformed
BlockingIterablesuch that each contained element in the originalBlockingIterableis transformed from typeSerializerto aBuffer.
-
serialize
public <T> Publisher<Buffer> serialize(Publisher<T> source, BufferAllocator allocator, TypeHolder<T> typeHolder)
Description copied from interface:SerializerTransforms the passedPublishersuch that each contained element of typeSerializeris serialized into aBuffer.- Specified by:
serializein interfaceSerializer- Type Parameters:
T- The data type to serialize.- Parameters:
source-Publishercontaining objects to serialize.allocator- TheBufferAllocatorused to allocateBuffers.typeHolder-TypeHolderholding theParameterizedTypeto be serialized.- Returns:
- A transformed
Publishersuch that each contained element in the originalPublisheris transformed from typeSerializerto aBuffer.
-
serialize
public <T> java.lang.Iterable<Buffer> serialize(java.lang.Iterable<T> source, BufferAllocator allocator, TypeHolder<T> typeHolder)
Description copied from interface:SerializerTransforms the passedIterablesuch that each contained element of typeSerializeris serialized into aBuffer.- Specified by:
serializein interfaceSerializer- Type Parameters:
T- The data type to serialize.- Parameters:
source-Iterablecontaining objects to serialize.allocator- TheBufferAllocatorused to allocateBuffers.typeHolder-TypeHolderholding theParameterizedTypeto be serialized.- Returns:
- A transformed
Iterablesuch that each contained element in the originalIterableis transformed from typeSerializerto aBuffer.
-
serialize
public <T> BlockingIterable<Buffer> serialize(BlockingIterable<T> source, BufferAllocator allocator, TypeHolder<T> typeHolder)
Description copied from interface:SerializerTransforms the passedBlockingIterablesuch that each contained element of typeSerializeris serialized into aBuffer.- Specified by:
serializein interfaceSerializer- Type Parameters:
T- The data type to serialize.- Parameters:
source-BlockingIterablecontaining objects to serialize.allocator- TheBufferAllocatorused to allocateBuffers.typeHolder-TypeHolderholding theParameterizedTypeto be serialized.- Returns:
- A transformed
BlockingIterablesuch that each contained element in the originalBlockingIterableis transformed from typeSerializerto aBuffer.
-
serialize
public <T> Publisher<Buffer> serialize(Publisher<T> source, BufferAllocator allocator, TypeHolder<T> typeHolder, java.util.function.IntUnaryOperator bytesEstimator)
Description copied from interface:SerializerTransforms the passedPublishersuch that each contained element of typeSerializeris serialized into aBuffer.- Specified by:
serializein interfaceSerializer- Type Parameters:
T- The data type to serialize.- Parameters:
source-Publishercontaining objects to serialize.allocator- TheBufferAllocatorused to allocateBuffers.typeHolder-TypeHolderholding theParameterizedTypeto be serialized.bytesEstimator- AnIntUnaryOperatorthat given the last serialized size in bytes, estimates the size of the next object to be serialized in bytes.- Returns:
- A transformed
Publishersuch that each contained element in the originalPublisheris transformed from typeSerializerto aBuffer.
-
serialize
public <T> java.lang.Iterable<Buffer> serialize(java.lang.Iterable<T> source, BufferAllocator allocator, TypeHolder<T> typeHolder, java.util.function.IntUnaryOperator bytesEstimator)
Description copied from interface:SerializerTransforms the passedIterablesuch that each contained element of typeSerializeris serialized into aBuffer.- Specified by:
serializein interfaceSerializer- Type Parameters:
T- The data type to serialize.- Parameters:
source-Iterablecontaining objects to serialize.allocator- TheBufferAllocatorused to allocateBuffers.typeHolder-TypeHolderholding theParameterizedTypeto be serialized.bytesEstimator- AnIntUnaryOperatorthat given the last serialized size in bytes, estimates the size of the next object to be serialized in bytes.- Returns:
- A transformed
Iterablesuch that each contained element in the originalIterableis transformed from typeSerializerto aBuffer.
-
serialize
public <T> BlockingIterable<Buffer> serialize(BlockingIterable<T> source, BufferAllocator allocator, TypeHolder<T> typeHolder, java.util.function.IntUnaryOperator bytesEstimator)
Description copied from interface:SerializerTransforms the passedBlockingIterablesuch that each contained element of typeSerializeris serialized into aBuffer.- Specified by:
serializein interfaceSerializer- Type Parameters:
T- The data type to serialize.- Parameters:
source-BlockingIterablecontaining objects to serialize.allocator- TheBufferAllocatorused to allocateBuffers.typeHolder-TypeHolderholding theParameterizedTypeto be serialized.bytesEstimator- AnIntUnaryOperatorthat given the last serialized size in bytes, estimates the size of the next object to be serialized in bytes.- Returns:
- A transformed
BlockingIterablesuch that each contained element in the originalBlockingIterableis transformed from typeSerializerto aBuffer.
-
serialize
public <T> Buffer serialize(T toSerialize, BufferAllocator allocator)
Description copied from interface:SerializerSerializes the passed objecttoSerializeto the returnedBuffer.- Specified by:
serializein interfaceSerializer- Type Parameters:
T- The data type to serialize.- Parameters:
toSerialize- Object to serialize.allocator-BufferAllocatorto allocate the returnedBuffer.- Returns:
Buffercontaining the serialized representation oftoSerialize.
-
serialize
public <T> Buffer serialize(T toSerialize, BufferAllocator allocator, int bytesEstimate)
Description copied from interface:SerializerSerializes the passed objecttoSerializeto the returnedBuffer.- Specified by:
serializein interfaceSerializer- Type Parameters:
T- The data type to serialize.- Parameters:
toSerialize- Object to serialize.allocator-BufferAllocatorto allocate the returnedBuffer.bytesEstimate- An estimate for the size in bytes of the serialized representation oftoSerialize.- Returns:
Buffercontaining the serialized representation oftoSerialize.
-
serialize
public <T> void serialize(T toSerialize, Buffer destination)Description copied from interface:SerializerSerializes the passed objecttoSerializeto the passedBuffer.- Specified by:
serializein interfaceSerializer- Type Parameters:
T- The data type to serialize.- Parameters:
toSerialize- Object to serialize.destination- TheBufferto which the serialized representation oftoSerializeis written.
-
deserialize
public <T> Publisher<T> deserialize(Publisher<Buffer> source, TypeHolder<T> typeHolder)
Description copied from interface:SerializerApplies a deserializer on the passedPublisherto convert into aPublisherof deserialized instances ofSerializer. If thesourcePublisherterminates with some left over data in a previously emittedBufferbut not deserialized in an object, then the returnedPublisherwill terminate with an error.If all content has been aggregated into a single
Buffer,Serializer.deserializeAggregated(Buffer, Class)can be used.- Specified by:
deserializein interfaceSerializer- Type Parameters:
T- The data type to deserialize.- Parameters:
source-PublishercontainingBuffers to deserialize.typeHolder-TypeHolderholding theParameterizedTypeto be deserialized.- Returns:
- A transformed
Publishersuch that each contained element in the originalPublisheris transformed from typeBufferto an instance ofSerializer.
-
deserialize
public <T> CloseableIterable<T> deserialize(java.lang.Iterable<Buffer> source, TypeHolder<T> typeHolder)
Description copied from interface:SerializerApplies a deserializer on the passedIterableto convert into aIterableof deserialized instances ofSerializer. If thesourceIterablecompletes with some left over data in a previously emittedBufferbut not deserialized in an object, thenIteratorfrom the returnedIterablewill throw anSerializationExceptionfromIterator.hasNext()after all deserialized instances are emitted.If all content has been aggregated into a single
Buffer,Serializer.deserializeAggregated(Buffer, TypeHolder)can be used.- Specified by:
deserializein interfaceSerializer- Type Parameters:
T- The data type to deserialize.- Parameters:
source-IterablecontainingBuffers to deserialize.typeHolder-TypeHolderholding theParameterizedTypeto be deserialized.- Returns:
- A transformed
CloseableIterablesuch that each contained element in the originalIterableis transformed from typeBufferto an instance ofSerializer.
-
deserialize
public <T> BlockingIterable<T> deserialize(BlockingIterable<Buffer> source, TypeHolder<T> typeHolder)
Description copied from interface:SerializerApplies a deserializer on the passedBlockingIterableto convert into aBlockingIterableof deserialized instances ofSerializer. If thesourceBlockingIterablecompletes with some left over data in a previously emittedBufferbut not deserialized in an object, thenBlockingIteratorfrom the returnedBlockingIterablewill throw anSerializationExceptionfromIterator.hasNext()after all deserialized instances are emitted.If all content has been aggregated into a single
Buffer,Serializer.deserializeAggregated(Buffer, Class)can be used.- Specified by:
deserializein interfaceSerializer- Type Parameters:
T- The data type to deserialize.- Parameters:
source-BlockingIterablecontainingBuffers to deserialize.typeHolder-TypeHolderholding theParameterizedTypeto be deserialized.- Returns:
- A transformed
BlockingIterablesuch that each contained element in the originalBlockingIterableis transformed from typeBufferto an instance ofSerializer.
-
deserialize
public <T> Publisher<T> deserialize(Publisher<Buffer> source, java.lang.Class<T> type)
Description copied from interface:SerializerApplies a deserializer on the passedPublisherto convert into aPublisherof deserialized instances ofSerializer. If thesourcePublisherterminates with some left over data in a previously emittedBufferbut not deserialized in an object, then the returnedPublisherwill terminate with an error.If all content has been aggregated into a single
Buffer,Serializer.deserializeAggregated(Buffer, Class)can be used.- Specified by:
deserializein interfaceSerializer- Type Parameters:
T- The data type to deserialize.- Parameters:
source-PublishercontainingBuffers to deserialize.type- The class forSerializer, the object to be deserialized.- Returns:
- A transformed
Publishersuch that each contained element in the originalPublisheris transformed from typeBufferto an instance ofSerializer.
-
deserialize
public <T> CloseableIterable<T> deserialize(java.lang.Iterable<Buffer> source, java.lang.Class<T> type)
Description copied from interface:SerializerApplies a deserializer on the passedIterableto convert into aCloseableIterableof deserialized instances ofSerializer. If thesourceIterablecompletes with some left over data in a previously emittedBufferbut not deserialized in an object, thenCloseableIteratorfrom the returnedCloseableIterablewill throw anSerializationExceptionfromIterator.hasNext()after all deserialized instances are emitted.If all content has been aggregated into a single
Buffer,Serializer.deserializeAggregated(Buffer, Class)can be used.- Specified by:
deserializein interfaceSerializer- Type Parameters:
T- The data type to deserialize.- Parameters:
source-IterablecontainingBuffers to deserialize.type- The class forSerializer, the object to be deserialized.- Returns:
- A transformed
CloseableIterablesuch that each contained element in the originalIterableis transformed from typeBufferto an instance ofSerializer.
-
deserialize
public <T> BlockingIterable<T> deserialize(BlockingIterable<Buffer> source, java.lang.Class<T> type)
Description copied from interface:SerializerApplies a deserializer on the passedBlockingIterableto convert into aIterableof deserialized instances ofSerializer. If thesourceBlockingIterablecompletes with some left over data in a previously emittedBufferbut not deserialized in an object, thenBlockingIteratorfrom the returnedBlockingIterablewill throw anSerializationExceptionfromIterator.hasNext()after all deserialized instances are emitted.If all content has been aggregated into a single
Buffer,Serializer.deserializeAggregated(Buffer, Class)can be used.- Specified by:
deserializein interfaceSerializer- Type Parameters:
T- The data type to deserialize.- Parameters:
source-BlockingIterablecontainingBuffers to deserialize.type- The class forSerializer, the object to be deserialized.- Returns:
- A transformed
BlockingIterablesuch that each contained element in the originalBlockingIterableis transformed from typeBufferto an instance ofSerializer.
-
deserializeAggregated
public <T> CloseableIterable<T> deserializeAggregated(Buffer serializedData, java.lang.Class<T> type)
Description copied from interface:SerializerDeserializes the passed encodedBufferto one or more instances ofSerializer.Incomplete data
This method assumes that the passedBuffercontains exact amount of data required to deserialize into at least one complete instance ofSerializer. If there is any left over data in theBufferafter the deserialization is complete,Iterator.hasNext()andIterator.next()methods will eventually throw aSerializationExceptionfrom theCloseableIteratorreturned byCloseableIterable.iterator(). In such a case, all deserialized data will first be returned from theCloseableIterator.- Specified by:
deserializeAggregatedin interfaceSerializer- Type Parameters:
T- The data type to deserialize.- Parameters:
serializedData- ABuffercontaining serialized representation of one or more instances ofSerializer.type- The class forSerializer, the object to be deserialized.- Returns:
- An
CloseableIterablecontaining one or more deserialized instances ofSerializer. If there is any left over data in theBufferafter the deserialization is complete,Iterator.hasNext()andIterator.next()methods will eventually throw aSerializationExceptionfrom theCloseableIteratorreturned byCloseableIterable.iterator(). In such a case, all deserialized data will first be returned from theIterator.
-
deserializeAggregated
public <T> CloseableIterable<T> deserializeAggregated(Buffer serializedData, TypeHolder<T> typeHolder)
Description copied from interface:SerializerDeserializes the passed encodedBufferto zero or more instances ofSerializer.Incomplete data
This method assumes that the passedBuffercontains exact amount of data required to deserialize into at least one complete instance ofSerializer. If there is any left over data in theBufferafter deserialization is complete,Iterator.hasNext()andIterator.next()methods will eventually throw aSerializationExceptionfrom theCloseableIteratorreturned byCloseableIterable.iterator(). In such a case, all deserialized data will first be returned from theCloseableIterator.- Specified by:
deserializeAggregatedin interfaceSerializer- Type Parameters:
T- The data type to deserialize.- Parameters:
serializedData- ABuffercontaining serialized representation of one or more instances ofSerializer.typeHolder-TypeHolderholding theParameterizedTypeto be deserialized.- Returns:
- An
CloseableIterablecontaining one or more deserialized instances ofSerializer. If there is any left over data in theBufferafter the deserialization is complete,Iterator.hasNext()andIterator.next()methods will eventually throw aSerializationExceptionfrom theCloseableIteratorreturned byCloseableIterable.iterator(). In such a case, all deserialized data will first be returned from theCloseableIterator.
-
deserializeAggregatedSingle
public <T> T deserializeAggregatedSingle(Buffer serializedData, java.lang.Class<T> type)
Description copied from interface:SerializerDeserializes the passed encodedBufferto a single instance ofSerializer.- Specified by:
deserializeAggregatedSinglein interfaceSerializer- Type Parameters:
T- The data type to deserialize.- Parameters:
serializedData- ABuffercontaining serialized representation of a single instance ofSerializer.type- The class forSerializer, the object to be deserialized.- Returns:
- The deserialized object.
-
deserializeAggregatedSingle
public <T> T deserializeAggregatedSingle(Buffer serializedData, TypeHolder<T> typeHolder)
Description copied from interface:SerializerDeserializes the passed encodedBufferto a single instance ofSerializer.- Specified by:
deserializeAggregatedSinglein interfaceSerializer- Type Parameters:
T- The data type to deserialize.- Parameters:
serializedData- ABuffercontaining serialized representation of a single instance ofSerializer.typeHolder-TypeHolderholding theParameterizedTypeto be deserialized.- Returns:
- The deserialized object.
-
-