com.hazelcast.nio.serialization
Class SerializationServiceImpl

java.lang.Object
  extended by com.hazelcast.nio.serialization.SerializationServiceImpl
All Implemented Interfaces:
SerializationService

public class SerializationServiceImpl
extends Object
implements SerializationService


Field Summary
protected static PartitioningStrategy EMPTY_PARTITIONING_STRATEGY
           
protected  PartitioningStrategy globalPartitioningStrategy
           
protected  InputOutputFactory inputOutputFactory
           
protected  ManagedContext managedContext
           
protected  PortableContext portableContext
           
 
Method Summary
protected  int calculatePartitionHash(Object obj, PartitioningStrategy strategy)
           
 BufferObjectDataInput createObjectDataInput(byte[] data)
           
 BufferObjectDataInput createObjectDataInput(Data data)
           
 ObjectDataInputStream createObjectDataInputStream(InputStream in)
           
 BufferObjectDataOutput createObjectDataOutput(int size)
           
 ObjectDataOutputStream createObjectDataOutputStream(OutputStream out)
           
 PortableReader createPortableReader(Data data)
           
protected  com.hazelcast.nio.serialization.SerializerAdapter createSerializerAdapter(Serializer serializer)
           
 void destroy()
           
 void disposeData(Data data)
           
 ByteOrder getByteOrder()
           
 ClassLoader getClassLoader()
           
 ManagedContext getManagedContext()
           
 PortableContext getPortableContext()
           
protected  RuntimeException handleException(Throwable e)
           
 boolean isActive()
           
protected  com.hazelcast.nio.serialization.SerializerAdapter lookupSerializer(Class type)
           
 BufferObjectDataOutput pop()
           
 void push(BufferObjectDataOutput out)
           
 Data readData(ObjectDataInput in)
           
<T> T
readObject(ObjectDataInput in)
           
protected  byte[] readPortableHeader(ObjectDataInput in)
           
 void register(Class type, Serializer serializer)
           
 void registerGlobal(Serializer serializer)
           
protected  com.hazelcast.nio.serialization.SerializerAdapter serializerFor(Class type)
           
protected  com.hazelcast.nio.serialization.SerializerAdapter serializerFor(int typeId)
           
 Data toData(Object obj)
           
 Data toData(Object obj, PartitioningStrategy strategy)
           
<T> T
toObject(Object object)
           
 void writeData(ObjectDataOutput out, Data data)
           
protected  void writeDataInternal(ObjectDataOutput out, Data data)
           
 void writeObject(ObjectDataOutput out, Object obj)
           
protected  void writePortableHeader(ObjectDataOutput out, Data data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_PARTITIONING_STRATEGY

protected static final PartitioningStrategy EMPTY_PARTITIONING_STRATEGY

managedContext

protected final ManagedContext managedContext

portableContext

protected final PortableContext portableContext

inputOutputFactory

protected final InputOutputFactory inputOutputFactory

globalPartitioningStrategy

protected final PartitioningStrategy globalPartitioningStrategy
Method Detail

toData

public final Data toData(Object obj)
Specified by:
toData in interface SerializationService

toData

public final Data toData(Object obj,
                         PartitioningStrategy strategy)
Specified by:
toData in interface SerializationService

calculatePartitionHash

protected final int calculatePartitionHash(Object obj,
                                           PartitioningStrategy strategy)

toObject

public final <T> T toObject(Object object)
Specified by:
toObject in interface SerializationService

writeObject

public final void writeObject(ObjectDataOutput out,
                              Object obj)
Specified by:
writeObject in interface SerializationService

readObject

public final <T> T readObject(ObjectDataInput in)
Specified by:
readObject in interface SerializationService

writeData

public final void writeData(ObjectDataOutput out,
                            Data data)
Specified by:
writeData in interface SerializationService

writePortableHeader

protected final void writePortableHeader(ObjectDataOutput out,
                                         Data data)
                                  throws IOException
Throws:
IOException

writeDataInternal

protected void writeDataInternal(ObjectDataOutput out,
                                 Data data)
                          throws IOException
Throws:
IOException

readData

public final Data readData(ObjectDataInput in)
Specified by:
readData in interface SerializationService

readPortableHeader

protected final byte[] readPortableHeader(ObjectDataInput in)
                                   throws IOException
Throws:
IOException

disposeData

public void disposeData(Data data)
Specified by:
disposeData in interface SerializationService

handleException

protected RuntimeException handleException(Throwable e)

pop

public final BufferObjectDataOutput pop()
Specified by:
pop in interface SerializationService

push

public final void push(BufferObjectDataOutput out)
Specified by:
push in interface SerializationService

createObjectDataInput

public final BufferObjectDataInput createObjectDataInput(byte[] data)
Specified by:
createObjectDataInput in interface SerializationService

createObjectDataInput

public final BufferObjectDataInput createObjectDataInput(Data data)
Specified by:
createObjectDataInput in interface SerializationService

createObjectDataOutput

public final BufferObjectDataOutput createObjectDataOutput(int size)
Specified by:
createObjectDataOutput in interface SerializationService

createObjectDataOutputStream

public final ObjectDataOutputStream createObjectDataOutputStream(OutputStream out)
Specified by:
createObjectDataOutputStream in interface SerializationService

createObjectDataInputStream

public final ObjectDataInputStream createObjectDataInputStream(InputStream in)
Specified by:
createObjectDataInputStream in interface SerializationService

register

public final void register(Class type,
                           Serializer serializer)
Specified by:
register in interface SerializationService

registerGlobal

public final void registerGlobal(Serializer serializer)
Specified by:
registerGlobal in interface SerializationService

createSerializerAdapter

protected com.hazelcast.nio.serialization.SerializerAdapter createSerializerAdapter(Serializer serializer)

serializerFor

protected final com.hazelcast.nio.serialization.SerializerAdapter serializerFor(Class type)

lookupSerializer

protected final com.hazelcast.nio.serialization.SerializerAdapter lookupSerializer(Class type)

serializerFor

protected final com.hazelcast.nio.serialization.SerializerAdapter serializerFor(int typeId)

getPortableContext

public PortableContext getPortableContext()
Specified by:
getPortableContext in interface SerializationService

createPortableReader

public final PortableReader createPortableReader(Data data)
                                          throws IOException
Specified by:
createPortableReader in interface SerializationService
Throws:
IOException

destroy

public void destroy()
Specified by:
destroy in interface SerializationService

getClassLoader

public final ClassLoader getClassLoader()
Specified by:
getClassLoader in interface SerializationService

getManagedContext

public final ManagedContext getManagedContext()
Specified by:
getManagedContext in interface SerializationService

getByteOrder

public ByteOrder getByteOrder()
Specified by:
getByteOrder in interface SerializationService

isActive

public boolean isActive()


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.