org.apache.flink.api.common.typeutils.base.IntValueSerializer Java Examples

The following examples show how to use org.apache.flink.api.common.typeutils.base.IntValueSerializer. 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 File: ValueTypeInfo.java    From Flink-CEPplus with 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 File: ValueTypeInfo.java    From flink with 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 File: ValueTypeInfo.java    From flink with 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);
	}
}