@PublicEvolving public interface SerializerConfig extends Serializable
Modifier and Type | Method and Description |
---|---|
void |
addDefaultKryoSerializer(Class<?> type,
Class<? extends com.esotericsoftware.kryo.Serializer<?>> serializerClass)
Adds a new Kryo default serializer to the Runtime.
|
<T extends com.esotericsoftware.kryo.Serializer<?> & Serializable> |
addDefaultKryoSerializer(Class<?> type,
T serializer)
Adds a new Kryo default serializer to the Runtime.
|
void |
configure(ReadableConfig configuration,
ClassLoader classLoader)
Sets all relevant options contained in the
ReadableConfig such as e.g. |
SerializerConfig |
copy() |
LinkedHashMap<Class<?>,Class<? extends com.esotericsoftware.kryo.Serializer<?>>> |
getDefaultKryoSerializerClasses()
Returns the registered default Kryo Serializer classes.
|
LinkedHashMap<Class<?>,ExecutionConfig.SerializableSerializer<?>> |
getDefaultKryoSerializers()
Deprecated.
The method is deprecated because
ExecutionConfig.SerializableSerializer
is deprecated. |
LinkedHashSet<Class<?>> |
getRegisteredKryoTypes()
Returns the registered Kryo types.
|
LinkedHashSet<Class<?>> |
getRegisteredPojoTypes()
Returns the registered POJO types.
|
Map<Class<?>,Class<? extends TypeInfoFactory<?>>> |
getRegisteredTypeInfoFactories()
Returns the registered type info factories.
|
LinkedHashMap<Class<?>,Class<? extends com.esotericsoftware.kryo.Serializer<?>>> |
getRegisteredTypesWithKryoSerializerClasses()
Returns the registered types with their Kryo Serializer classes.
|
LinkedHashMap<Class<?>,ExecutionConfig.SerializableSerializer<?>> |
getRegisteredTypesWithKryoSerializers()
Deprecated.
The method is deprecated because instance-type Kryo serializer definition based
on
ExecutionConfig.SerializableSerializer is deprecated. Use class-type Kryo
serializers instead. |
boolean |
hasGenericTypesDisabled()
Checks whether generic types are supported.
|
boolean |
isForceAvroEnabled()
Returns whether the Apache Avro is the serializer for POJOs.
|
TernaryBoolean |
isForceKryoAvroEnabled()
Returns whether forces Flink to register Apache Avro classes in Kryo serializer.
|
boolean |
isForceKryoEnabled()
Returns whether Kryo is the serializer for POJOs.
|
void |
registerKryoType(Class<?> type)
Registers the given type with the serialization stack.
|
void |
registerPojoType(Class<?> type)
Registers the given type with the serialization stack.
|
void |
registerTypeWithKryoSerializer(Class<?> type,
Class<? extends com.esotericsoftware.kryo.Serializer> serializerClass)
Registers the given Serializer via its class as a serializer for the given type at the
KryoSerializer.
|
<T extends com.esotericsoftware.kryo.Serializer<?> & Serializable> |
registerTypeWithKryoSerializer(Class<?> type,
T serializer)
Registers the given type with a Kryo Serializer.
|
void |
setForceAvro(boolean forceAvro)
The method will be converted to private in the next Flink major version after removing its
deprecated caller methods.
|
void |
setForceKryo(boolean forceKryo)
The method will be converted to private in the next Flink major version after removing its
deprecated caller methods.
|
void |
setForceKryoAvro(boolean forceKryoAvro)
The method will be converted to private in the next Flink major version after removing its
deprecated caller methods.
|
void |
setGenericTypes(boolean genericTypes)
The method will be converted to private in the next Flink major version after removing its
deprecated caller methods.
|
@Internal <T extends com.esotericsoftware.kryo.Serializer<?> & Serializable> void addDefaultKryoSerializer(Class<?> type, T serializer)
Note that the serializer instance must be serializable (as defined by java.io.Serializable), because it may be distributed to the worker nodes by java serialization.
The method will be converted to private in the next Flink major version after removing its deprecated caller methods.
type
- The class of the types serialized with the given serializer.serializer
- The serializer to use.@Internal void addDefaultKryoSerializer(Class<?> type, Class<? extends com.esotericsoftware.kryo.Serializer<?>> serializerClass)
The method will be converted to private in the next Flink major version after removing its deprecated caller methods.
type
- The class of the types serialized with the given serializer.serializerClass
- The class of the serializer to use.@Internal <T extends com.esotericsoftware.kryo.Serializer<?> & Serializable> void registerTypeWithKryoSerializer(Class<?> type, T serializer)
Note that the serializer instance must be serializable (as defined by java.io.Serializable), because it may be distributed to the worker nodes by java serialization.
The method will be converted to private in the next Flink major version after removing its deprecated caller methods.
type
- The class of the types serialized with the given serializer.serializer
- The serializer to use.@Internal void registerTypeWithKryoSerializer(Class<?> type, Class<? extends com.esotericsoftware.kryo.Serializer> serializerClass)
The method will be converted to private in the next Flink major version after removing its deprecated caller methods.
type
- The class of the types serialized with the given serializer.serializerClass
- The class of the serializer to use.@Internal void registerPojoType(Class<?> type)
The method will be converted to private in the next Flink major version after removing its deprecated caller methods.
type
- The class of the type to register.@Internal void registerKryoType(Class<?> type)
The method will be converted to private in the next Flink major version after removing its deprecated caller methods.
type
- The class of the type to register.@Deprecated LinkedHashMap<Class<?>,ExecutionConfig.SerializableSerializer<?>> getRegisteredTypesWithKryoSerializers()
ExecutionConfig.SerializableSerializer
is deprecated. Use class-type Kryo
serializers instead.LinkedHashMap<Class<?>,Class<? extends com.esotericsoftware.kryo.Serializer<?>>> getRegisteredTypesWithKryoSerializerClasses()
@Deprecated LinkedHashMap<Class<?>,ExecutionConfig.SerializableSerializer<?>> getDefaultKryoSerializers()
ExecutionConfig.SerializableSerializer
is deprecated.LinkedHashMap<Class<?>,Class<? extends com.esotericsoftware.kryo.Serializer<?>>> getDefaultKryoSerializerClasses()
LinkedHashSet<Class<?>> getRegisteredKryoTypes()
LinkedHashSet<Class<?>> getRegisteredPojoTypes()
Map<Class<?>,Class<? extends TypeInfoFactory<?>>> getRegisteredTypeInfoFactories()
boolean hasGenericTypesDisabled()
Generic types are enabled by default.
@Internal void setGenericTypes(boolean genericTypes)
boolean isForceKryoEnabled()
@Internal void setForceKryo(boolean forceKryo)
boolean isForceAvroEnabled()
@Internal void setForceAvro(boolean forceAvro)
@Internal void setForceKryoAvro(boolean forceKryoAvro)
TernaryBoolean isForceKryoAvroEnabled()
void configure(ReadableConfig configuration, ClassLoader classLoader)
ReadableConfig
such as e.g. PipelineOptions.FORCE_KRYO
.
It will change the value of a setting only if a corresponding option was set in the configuration
. If a key is not present, the current value of a field will remain untouched.
configuration
- a configuration to read the values fromclassLoader
- a class loader to use when loading classesSerializerConfig copy()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.