Java Code Examples for org.apache.flink.queryablestate.messages.KvStateRequest#KvStateRequestDeserializer

The following examples show how to use org.apache.flink.queryablestate.messages.KvStateRequest#KvStateRequestDeserializer . 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: QueryableStateClient.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
/**
 * Create the Queryable State Client.
 * @param remoteAddress the {@link InetAddress address} of the {@code Client Proxy} to connect to.
 * @param remotePort the port of the proxy to connect to.
 */
public QueryableStateClient(final InetAddress remoteAddress, final int remotePort) {
	Preconditions.checkArgument(remotePort >= 0 && remotePort <= 65536,
			"Remote Port " + remotePort + " is out of valid port range (0-65536).");

	this.remoteAddress = new InetSocketAddress(remoteAddress, remotePort);

	final MessageSerializer<KvStateRequest, KvStateResponse> messageSerializer =
			new MessageSerializer<>(
					new KvStateRequest.KvStateRequestDeserializer(),
					new KvStateResponse.KvStateResponseDeserializer());

	this.client = new Client<>(
			"Queryable State Client",
			1,
			messageSerializer,
			new DisabledKvStateRequestStats());
}
 
Example 2
Source File: QueryableStateClient.java    From flink with Apache License 2.0 6 votes vote down vote up
/**
 * Create the Queryable State Client.
 * @param remoteAddress the {@link InetAddress address} of the {@code Client Proxy} to connect to.
 * @param remotePort the port of the proxy to connect to.
 */
public QueryableStateClient(final InetAddress remoteAddress, final int remotePort) {
	Preconditions.checkArgument(remotePort >= 0 && remotePort <= 65536,
			"Remote Port " + remotePort + " is out of valid port range (0-65536).");

	this.remoteAddress = new InetSocketAddress(remoteAddress, remotePort);

	final MessageSerializer<KvStateRequest, KvStateResponse> messageSerializer =
			new MessageSerializer<>(
					new KvStateRequest.KvStateRequestDeserializer(),
					new KvStateResponse.KvStateResponseDeserializer());

	this.client = new Client<>(
			"Queryable State Client",
			1,
			messageSerializer,
			new DisabledKvStateRequestStats());
}
 
Example 3
Source File: QueryableStateClient.java    From flink with Apache License 2.0 6 votes vote down vote up
/**
 * Create the Queryable State Client.
 * @param remoteAddress the {@link InetAddress address} of the {@code Client Proxy} to connect to.
 * @param remotePort the port of the proxy to connect to.
 */
public QueryableStateClient(final InetAddress remoteAddress, final int remotePort) {
	Preconditions.checkArgument(NetUtils.isValidHostPort(remotePort),
			"Remote Port " + remotePort + " is out of valid port range [0-65535].");

	this.remoteAddress = new InetSocketAddress(remoteAddress, remotePort);

	final MessageSerializer<KvStateRequest, KvStateResponse> messageSerializer =
			new MessageSerializer<>(
					new KvStateRequest.KvStateRequestDeserializer(),
					new KvStateResponse.KvStateResponseDeserializer());

	this.client = new Client<>(
			"Queryable State Client",
			1,
			messageSerializer,
			new DisabledKvStateRequestStats());
}
 
Example 4
Source File: KvStateClientProxyImpl.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Override
public AbstractServerHandler<KvStateRequest, KvStateResponse> initializeHandler() {
	MessageSerializer<KvStateRequest, KvStateResponse> serializer =
			new MessageSerializer<>(
					new KvStateRequest.KvStateRequestDeserializer(),
					new KvStateResponse.KvStateResponseDeserializer());
	return new KvStateClientProxyHandler(this, queryExecutorThreads, serializer, stats);
}
 
Example 5
Source File: KvStateClientProxyImpl.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public AbstractServerHandler<KvStateRequest, KvStateResponse> initializeHandler() {
	MessageSerializer<KvStateRequest, KvStateResponse> serializer =
			new MessageSerializer<>(
					new KvStateRequest.KvStateRequestDeserializer(),
					new KvStateResponse.KvStateResponseDeserializer());
	return new KvStateClientProxyHandler(this, queryExecutorThreads, serializer, stats);
}
 
Example 6
Source File: KvStateClientProxyImpl.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public AbstractServerHandler<KvStateRequest, KvStateResponse> initializeHandler() {
	MessageSerializer<KvStateRequest, KvStateResponse> serializer =
			new MessageSerializer<>(
					new KvStateRequest.KvStateRequestDeserializer(),
					new KvStateResponse.KvStateResponseDeserializer());
	return new KvStateClientProxyHandler(this, queryExecutorThreads, serializer, stats);
}