Java Code Examples for org.apache.flink.api.common.typeutils.base.StringValueSerializer

The following examples show how to use org.apache.flink.api.common.typeutils.base.StringValueSerializer. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Flink-CEPplus   Source File: ValueTypeInfo.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@SuppressWarnings("unchecked")
@PublicEvolving
public TypeSerializer<T> createSerializer(ExecutionConfig executionConfig) {
	if (BooleanValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) BooleanValueSerializer.INSTANCE;
	}
	else if (ByteValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) ByteValueSerializer.INSTANCE;
	}
	else if (CharValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) CharValueSerializer.INSTANCE;
	}
	else if (DoubleValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) DoubleValueSerializer.INSTANCE;
	}
	else if (FloatValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) FloatValueSerializer.INSTANCE;
	}
	else if (IntValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) IntValueSerializer.INSTANCE;
	}
	else if (LongValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) LongValueSerializer.INSTANCE;
	}
	else if (NullValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) NullValueSerializer.INSTANCE;
	}
	else if (ShortValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) ShortValueSerializer.INSTANCE;
	}
	else if (StringValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) StringValueSerializer.INSTANCE;
	}
	else if (CopyableValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) createCopyableValueSerializer(type.asSubclass(CopyableValue.class));
	}
	else {
		return new ValueSerializer<T>(type);
	}
}
 
Example 2
Source Project: flink   Source File: ValueTypeInfo.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@SuppressWarnings("unchecked")
@PublicEvolving
public TypeSerializer<T> createSerializer(ExecutionConfig executionConfig) {
	if (BooleanValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) BooleanValueSerializer.INSTANCE;
	}
	else if (ByteValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) ByteValueSerializer.INSTANCE;
	}
	else if (CharValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) CharValueSerializer.INSTANCE;
	}
	else if (DoubleValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) DoubleValueSerializer.INSTANCE;
	}
	else if (FloatValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) FloatValueSerializer.INSTANCE;
	}
	else if (IntValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) IntValueSerializer.INSTANCE;
	}
	else if (LongValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) LongValueSerializer.INSTANCE;
	}
	else if (NullValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) NullValueSerializer.INSTANCE;
	}
	else if (ShortValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) ShortValueSerializer.INSTANCE;
	}
	else if (StringValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) StringValueSerializer.INSTANCE;
	}
	else if (CopyableValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) createCopyableValueSerializer(type.asSubclass(CopyableValue.class));
	}
	else {
		return new ValueSerializer<T>(type);
	}
}
 
Example 3
Source Project: flink   Source File: ValueTypeInfo.java    License: Apache License 2.0 4 votes vote down vote up
@Override
@SuppressWarnings("unchecked")
@PublicEvolving
public TypeSerializer<T> createSerializer(ExecutionConfig executionConfig) {
	if (BooleanValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) BooleanValueSerializer.INSTANCE;
	}
	else if (ByteValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) ByteValueSerializer.INSTANCE;
	}
	else if (CharValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) CharValueSerializer.INSTANCE;
	}
	else if (DoubleValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) DoubleValueSerializer.INSTANCE;
	}
	else if (FloatValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) FloatValueSerializer.INSTANCE;
	}
	else if (IntValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) IntValueSerializer.INSTANCE;
	}
	else if (LongValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) LongValueSerializer.INSTANCE;
	}
	else if (NullValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) NullValueSerializer.INSTANCE;
	}
	else if (ShortValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) ShortValueSerializer.INSTANCE;
	}
	else if (StringValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) StringValueSerializer.INSTANCE;
	}
	else if (CopyableValue.class.isAssignableFrom(type)) {
		return (TypeSerializer<T>) createCopyableValueSerializer(type.asSubclass(CopyableValue.class));
	}
	else {
		return new ValueSerializer<T>(type);
	}
}