public abstract class AbstractSerializationService extends Object implements InternalSerializationService
| Modifier and Type | Field and Description |
|---|---|
protected BufferPoolThreadLocal |
bufferPoolThreadLocal |
protected com.hazelcast.internal.serialization.impl.SerializerAdapter |
dataSerializerAdapter |
protected PartitioningStrategy |
globalPartitioningStrategy |
protected InputOutputFactory |
inputOutputFactory |
protected com.hazelcast.internal.serialization.impl.SerializerAdapter |
javaExternalizableAdapter |
protected com.hazelcast.internal.serialization.impl.SerializerAdapter |
javaSerializerAdapter |
protected ManagedContext |
managedContext |
protected com.hazelcast.internal.serialization.impl.SerializerAdapter |
nullSerializerAdapter |
protected com.hazelcast.internal.serialization.impl.SerializerAdapter |
portableSerializerAdapter |
VERSION_1| Modifier and Type | Method and Description |
|---|---|
protected int |
calculatePartitionHash(Object obj,
PartitioningStrategy strategy) |
BufferObjectDataInput |
createObjectDataInput(byte[] data) |
BufferObjectDataInput |
createObjectDataInput(Data data) |
BufferObjectDataOutput |
createObjectDataOutput() |
BufferObjectDataOutput |
createObjectDataOutput(int size) |
void |
dispose()
Disposes this object and releases any data and/or resources associated
with it.
|
void |
disposeData(Data data) |
ByteOrder |
getByteOrder() |
ClassLoader |
getClassLoader() |
ManagedContext |
getManagedContext()
|
byte |
getVersion() |
<T> T |
readObject(ObjectDataInput in) |
<T> T |
readObject(ObjectDataInput in,
Class aClass) |
void |
register(Class type,
Serializer serializer) |
protected void |
registerConstant(Class type,
Serializer serializer) |
protected void |
registerConstant(Class type,
com.hazelcast.internal.serialization.impl.SerializerAdapter serializer) |
void |
registerGlobal(Serializer serializer) |
void |
registerGlobal(Serializer serializer,
boolean overrideJavaSerialization) |
protected boolean |
safeRegister(Class type,
Serializer serializer) |
protected boolean |
safeRegister(Class type,
com.hazelcast.internal.serialization.impl.SerializerAdapter serializer) |
protected com.hazelcast.internal.serialization.impl.SerializerAdapter |
serializerFor(int typeId) |
protected com.hazelcast.internal.serialization.impl.SerializerAdapter |
serializerFor(Object object) |
byte[] |
toBytes(Object obj) |
byte[] |
toBytes(Object obj,
PartitioningStrategy strategy) |
<B extends Data> |
toData(Object obj)
Serializes an object to a
Data. |
<B extends Data> |
toData(Object obj,
PartitioningStrategy strategy)
Serializes an object to a
Data. |
<T> T |
toObject(Object object)
Deserializes an object.
|
<T> T |
toObject(Object object,
Class aClass)
Deserializes an object.
|
void |
writeObject(ObjectDataOutput out,
Object obj) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreatePortableReader, getPortableContextprotected final ManagedContext managedContext
protected final InputOutputFactory inputOutputFactory
protected final PartitioningStrategy globalPartitioningStrategy
protected final BufferPoolThreadLocal bufferPoolThreadLocal
protected com.hazelcast.internal.serialization.impl.SerializerAdapter dataSerializerAdapter
protected com.hazelcast.internal.serialization.impl.SerializerAdapter portableSerializerAdapter
protected final com.hazelcast.internal.serialization.impl.SerializerAdapter nullSerializerAdapter
protected com.hazelcast.internal.serialization.impl.SerializerAdapter javaSerializerAdapter
protected com.hazelcast.internal.serialization.impl.SerializerAdapter javaExternalizableAdapter
public final <B extends Data> B toData(Object obj)
SerializationServiceData.
This method can safely be called with a Data instance. In that case, that instance is returned.
If this method is called with null, null is returned.toData in interface SerializationServiceobj - the object to serialize.public final <B extends Data> B toData(Object obj, PartitioningStrategy strategy)
SerializationServiceData.
This method can safely be called with a Data instance. In that case, that instance is returned.
If this method is called with null, null is returned.toData in interface SerializationServiceobj - the object to serialize.strategy - strategy is used to calculate partition id of the resulting data see PartitioningStrategypublic byte[] toBytes(Object obj)
toBytes in interface InternalSerializationServicepublic byte[] toBytes(Object obj, PartitioningStrategy strategy)
toBytes in interface InternalSerializationServicepublic final <T> T toObject(Object object)
SerializationServicetoObject in interface SerializationServiceobject - the data to deserialize.public final <T> T toObject(Object object, Class aClass)
SerializationServicetoObject in interface SerializationServiceobject - the data to deserialize.aClass - The class to instantiate when deserializing the object.public final void writeObject(ObjectDataOutput out, Object obj)
writeObject in interface InternalSerializationServicepublic final <T> T readObject(ObjectDataInput in)
readObject in interface InternalSerializationServicepublic final <T> T readObject(ObjectDataInput in, Class aClass)
readObject in interface InternalSerializationServicepublic void disposeData(Data data)
disposeData in interface InternalSerializationServicepublic final BufferObjectDataInput createObjectDataInput(byte[] data)
createObjectDataInput in interface InternalSerializationServicepublic final BufferObjectDataInput createObjectDataInput(Data data)
createObjectDataInput in interface InternalSerializationServicepublic final BufferObjectDataOutput createObjectDataOutput(int size)
createObjectDataOutput in interface InternalSerializationServicepublic BufferObjectDataOutput createObjectDataOutput()
createObjectDataOutput in interface InternalSerializationServicepublic final ClassLoader getClassLoader()
getClassLoader in interface InternalSerializationServicepublic final ManagedContext getManagedContext()
SerializationServicegetManagedContext in interface SerializationServicepublic ByteOrder getByteOrder()
getByteOrder in interface InternalSerializationServicepublic byte getVersion()
getVersion in interface InternalSerializationServicepublic void dispose()
Disposabledispose in interface Disposablepublic final void register(Class type, Serializer serializer)
public final void registerGlobal(Serializer serializer)
public final void registerGlobal(Serializer serializer, boolean overrideJavaSerialization)
protected final int calculatePartitionHash(Object obj, PartitioningStrategy strategy)
protected final boolean safeRegister(Class type, Serializer serializer)
protected final boolean safeRegister(Class type, com.hazelcast.internal.serialization.impl.SerializerAdapter serializer)
protected final void registerConstant(Class type, Serializer serializer)
protected final void registerConstant(Class type, com.hazelcast.internal.serialization.impl.SerializerAdapter serializer)
protected final com.hazelcast.internal.serialization.impl.SerializerAdapter serializerFor(int typeId)
protected final com.hazelcast.internal.serialization.impl.SerializerAdapter serializerFor(Object object)
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.