com.senseidb.cluster.client
Class SenseiNetworkClient
java.lang.Object
com.senseidb.cluster.client.SenseiNetworkClient
- All Implemented Interfaces:
- com.linkedin.norbert.javacompat.network.BaseNetworkClient, com.linkedin.norbert.javacompat.network.PartitionedNetworkClient<Integer>
public class SenseiNetworkClient
- extends Object
- implements com.linkedin.norbert.javacompat.network.PartitionedNetworkClient<Integer>
- Author:
- nnarkhed
Constructor Summary |
SenseiNetworkClient(com.linkedin.norbert.javacompat.network.NetworkClientConfig netConfig,
com.linkedin.norbert.javacompat.network.PartitionedLoadBalancerFactory<Integer> routerFactory)
|
Method Summary |
<RequestMsg,ResponseMsg>
com.linkedin.norbert.network.ResponseIterator<ResponseMsg> |
|
broadcastMessage(RequestMsg request,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
|
<RequestMsg,ResponseMsg>
Future<ResponseMsg> |
|
sendRequest(Integer partition,
RequestMsg request,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
|
<RequestMsg,ResponseMsg,T>
T |
|
sendRequest(Set<Integer> partitions,
com.linkedin.norbert.javacompat.network.RequestBuilder<Integer,RequestMsg> requestBuilder,
com.linkedin.norbert.javacompat.network.ScatterGatherHandler<RequestMsg,ResponseMsg,T,Integer> scatterGatherHandler,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
|
<RequestMsg,ResponseMsg>
com.linkedin.norbert.network.ResponseIterator<ResponseMsg> |
|
sendRequest(Set<Integer> partitions,
com.linkedin.norbert.javacompat.network.RequestBuilder<Integer,RequestMsg> requestBuilder,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
|
<RequestMsg,ResponseMsg>
com.linkedin.norbert.network.ResponseIterator<ResponseMsg> |
|
sendRequest(Set<Integer> partitions,
RequestMsg request,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
|
<RequestMsg,ResponseMsg>
Future<ResponseMsg> |
|
sendRequestToNode(RequestMsg request,
com.linkedin.norbert.javacompat.cluster.Node node,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
|
<RequestMsg,ResponseMsg>
com.linkedin.norbert.network.ResponseIterator<ResponseMsg> |
|
sendRequestToOneReplica(com.linkedin.norbert.javacompat.network.RequestBuilder<Integer,RequestMsg> requestBuilder,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
|
<RequestMsg,ResponseMsg>
com.linkedin.norbert.network.ResponseIterator<ResponseMsg> |
|
sendRequestToOneReplica(RequestMsg request,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
|
void |
shutdown()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SenseiNetworkClient
public SenseiNetworkClient(com.linkedin.norbert.javacompat.network.NetworkClientConfig netConfig,
com.linkedin.norbert.javacompat.network.PartitionedLoadBalancerFactory<Integer> routerFactory)
sendRequest
public <RequestMsg,ResponseMsg> Future<ResponseMsg> sendRequest(Integer partition,
RequestMsg request,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
throws com.linkedin.norbert.cluster.InvalidClusterException,
com.linkedin.norbert.network.NoNodesAvailableException,
com.linkedin.norbert.cluster.ClusterDisconnectedException
- Specified by:
sendRequest
in interface com.linkedin.norbert.javacompat.network.PartitionedNetworkClient<Integer>
- Throws:
com.linkedin.norbert.cluster.InvalidClusterException
com.linkedin.norbert.network.NoNodesAvailableException
com.linkedin.norbert.cluster.ClusterDisconnectedException
sendRequest
public <RequestMsg,ResponseMsg> com.linkedin.norbert.network.ResponseIterator<ResponseMsg> sendRequest(Set<Integer> partitions,
RequestMsg request,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
throws com.linkedin.norbert.cluster.InvalidClusterException,
com.linkedin.norbert.network.NoNodesAvailableException,
com.linkedin.norbert.cluster.ClusterDisconnectedException
- Specified by:
sendRequest
in interface com.linkedin.norbert.javacompat.network.PartitionedNetworkClient<Integer>
- Throws:
com.linkedin.norbert.cluster.InvalidClusterException
com.linkedin.norbert.network.NoNodesAvailableException
com.linkedin.norbert.cluster.ClusterDisconnectedException
sendRequest
public <RequestMsg,ResponseMsg> com.linkedin.norbert.network.ResponseIterator<ResponseMsg> sendRequest(Set<Integer> partitions,
com.linkedin.norbert.javacompat.network.RequestBuilder<Integer,RequestMsg> requestBuilder,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
throws Exception
- Specified by:
sendRequest
in interface com.linkedin.norbert.javacompat.network.PartitionedNetworkClient<Integer>
- Throws:
Exception
sendRequest
public <RequestMsg,ResponseMsg,T> T sendRequest(Set<Integer> partitions,
com.linkedin.norbert.javacompat.network.RequestBuilder<Integer,RequestMsg> requestBuilder,
com.linkedin.norbert.javacompat.network.ScatterGatherHandler<RequestMsg,ResponseMsg,T,Integer> scatterGatherHandler,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
throws Exception
- Specified by:
sendRequest
in interface com.linkedin.norbert.javacompat.network.PartitionedNetworkClient<Integer>
- Throws:
Exception
sendRequestToOneReplica
public <RequestMsg,ResponseMsg> com.linkedin.norbert.network.ResponseIterator<ResponseMsg> sendRequestToOneReplica(com.linkedin.norbert.javacompat.network.RequestBuilder<Integer,RequestMsg> requestBuilder,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
throws com.linkedin.norbert.cluster.InvalidClusterException,
com.linkedin.norbert.network.NoNodesAvailableException,
com.linkedin.norbert.cluster.ClusterDisconnectedException
- Specified by:
sendRequestToOneReplica
in interface com.linkedin.norbert.javacompat.network.PartitionedNetworkClient<Integer>
- Throws:
com.linkedin.norbert.cluster.InvalidClusterException
com.linkedin.norbert.network.NoNodesAvailableException
com.linkedin.norbert.cluster.ClusterDisconnectedException
sendRequestToOneReplica
public <RequestMsg,ResponseMsg> com.linkedin.norbert.network.ResponseIterator<ResponseMsg> sendRequestToOneReplica(RequestMsg request,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
throws com.linkedin.norbert.cluster.InvalidClusterException,
com.linkedin.norbert.network.NoNodesAvailableException,
com.linkedin.norbert.cluster.ClusterDisconnectedException
- Specified by:
sendRequestToOneReplica
in interface com.linkedin.norbert.javacompat.network.PartitionedNetworkClient<Integer>
- Throws:
com.linkedin.norbert.cluster.InvalidClusterException
com.linkedin.norbert.network.NoNodesAvailableException
com.linkedin.norbert.cluster.ClusterDisconnectedException
sendRequestToNode
public <RequestMsg,ResponseMsg> Future<ResponseMsg> sendRequestToNode(RequestMsg request,
com.linkedin.norbert.javacompat.cluster.Node node,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
throws com.linkedin.norbert.cluster.InvalidNodeException,
com.linkedin.norbert.cluster.ClusterDisconnectedException
- Specified by:
sendRequestToNode
in interface com.linkedin.norbert.javacompat.network.BaseNetworkClient
- Throws:
com.linkedin.norbert.cluster.InvalidNodeException
com.linkedin.norbert.cluster.ClusterDisconnectedException
broadcastMessage
public <RequestMsg,ResponseMsg> com.linkedin.norbert.network.ResponseIterator<ResponseMsg> broadcastMessage(RequestMsg request,
com.linkedin.norbert.network.Serializer<RequestMsg,ResponseMsg> serializer)
throws com.linkedin.norbert.cluster.ClusterDisconnectedException
- Specified by:
broadcastMessage
in interface com.linkedin.norbert.javacompat.network.BaseNetworkClient
- Throws:
com.linkedin.norbert.cluster.ClusterDisconnectedException
shutdown
public void shutdown()
- Specified by:
shutdown
in interface com.linkedin.norbert.javacompat.network.BaseNetworkClient
Copyright © 2010-2012. All Rights Reserved.