Package com.hazelcast.config
Class SerializerConfig
- java.lang.Object
-
- com.hazelcast.config.SerializerConfig
-
public class SerializerConfig extends java.lang.Object
Contains the serialization configuration for a particular class.
-
-
Constructor Summary
Constructors Constructor Description SerializerConfig()
SerializerConfig(SerializerConfig serializerConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getClassName()
Returns the class name of the serializer implementation.Serializer
getImplementation()
Returns the implementation of the serializer class.java.lang.Class
getTypeClass()
Gets the type of the class that will be serialized via this implementation.java.lang.String
getTypeClassName()
Gets the name of the class that will be serialized via this implementation.int
hashCode()
SerializerConfig
setClass(java.lang.Class<? extends Serializer> clazz)
Sets the class of the serializer implementation.SerializerConfig
setClassName(java.lang.String className)
Sets the class name of the serializer implementation.SerializerConfig
setImplementation(Serializer implementation)
Sets the serializer implementation instance.SerializerConfig
setTypeClass(java.lang.Class typeClass)
Sets the type of the class that will be serialized via this implementation.SerializerConfig
setTypeClassName(java.lang.String typeClassName)
This method is called only if typeClass is not set.java.lang.String
toString()
-
-
-
Constructor Detail
-
SerializerConfig
public SerializerConfig()
-
SerializerConfig
public SerializerConfig(SerializerConfig serializerConfig)
-
-
Method Detail
-
getClassName
public java.lang.String getClassName()
Returns the class name of the serializer implementation.- Returns:
- the class name of serializer implementation
-
setClass
public SerializerConfig setClass(java.lang.Class<? extends Serializer> clazz)
Sets the class of the serializer implementation.- Parameters:
clazz
- the set class of the serializer implementation- Returns:
- SerializerConfig
-
setClassName
public SerializerConfig setClassName(@Nonnull java.lang.String className)
Sets the class name of the serializer implementation.- Parameters:
className
- the class name of the serializer implementation- Returns:
- SerializationConfig
-
getImplementation
public Serializer getImplementation()
Returns the implementation of the serializer class.- Returns:
- the implementation of the serializer class
- See Also:
setImplementation(com.hazelcast.nio.serialization.Serializer)
-
setImplementation
public SerializerConfig setImplementation(@Nonnull Serializer implementation)
Sets the serializer implementation instance.
Serializer must be instance of eitherStreamSerializer
orByteArraySerializer
.- Parameters:
implementation
- the serializer instance- Returns:
- SerializerConfig
-
getTypeClass
public java.lang.Class getTypeClass()
Gets the type of the class that will be serialized via this implementation.- Returns:
- typeClass type of the class that will be serialized via this implementation
- See Also:
setTypeClass(Class)
-
setTypeClass
public SerializerConfig setTypeClass(@Nonnull java.lang.Class typeClass)
Sets the type of the class that will be serialized via this implementation.- Parameters:
typeClass
- type of the class that will be serialized via this implementation- Returns:
- SerializerConfig
-
getTypeClassName
public java.lang.String getTypeClassName()
Gets the name of the class that will be serialized via this implementation.- Returns:
- typeClassName name of the class that will be serialized via this implementation
- See Also:
setTypeClassName(String)
-
setTypeClassName
public SerializerConfig setTypeClassName(@Nonnull java.lang.String typeClassName)
This method is called only if typeClass is not set. If type class is not set, class will try to be loaded from class loader via given className using this method.- Parameters:
typeClassName
- name of the class that will be serialized via this implementation- Returns:
- SerializerConfig
-
equals
public final boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-