com.senseidb.search.node
Class SenseiSysBroker
java.lang.Object
com.senseidb.search.node.AbstractSenseiBroker<REQUEST,RESULT>
com.senseidb.search.node.AbstractConsistentHashBroker<SenseiRequest,SenseiSystemInfo>
com.senseidb.search.node.SenseiSysBroker
- All Implemented Interfaces:
- com.linkedin.norbert.javacompat.cluster.ClusterListener
public class SenseiSysBroker
- extends AbstractConsistentHashBroker<SenseiRequest,SenseiSystemInfo>
Field Summary |
protected Set<com.linkedin.norbert.javacompat.cluster.Node> |
_nodes
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_nodes
protected Set<com.linkedin.norbert.javacompat.cluster.Node> _nodes
SenseiSysBroker
public SenseiSysBroker(com.linkedin.norbert.javacompat.network.PartitionedNetworkClient<Integer> networkClient,
com.linkedin.norbert.javacompat.cluster.ClusterClient clusterClient,
SenseiLoadBalancerFactory loadBalancerFactory,
Comparator<String> versionComparator)
throws com.linkedin.norbert.NorbertException
- Throws:
com.linkedin.norbert.NorbertException
mergeResults
public SenseiSystemInfo mergeResults(SenseiRequest request,
List<SenseiSystemInfo> resultList)
- Description copied from class:
AbstractConsistentHashBroker
- Merge results on the client/broker side. It likely works differently from
the one in the search node.
- Specified by:
mergeResults
in class AbstractConsistentHashBroker<SenseiRequest,SenseiSystemInfo>
- Parameters:
request
- the original request objectresultList
- the list of results from all the requested partitions.
- Returns:
- one single result instance that is merged from the result list.
doBrowse
protected SenseiSystemInfo doBrowse(com.linkedin.norbert.javacompat.network.PartitionedNetworkClient<Integer> networkClient,
SenseiRequest req,
it.unimi.dsi.fastutil.ints.IntSet partitions)
- Overrides:
doBrowse
in class AbstractConsistentHashBroker<SenseiRequest,SenseiSystemInfo>
getRouteParam
public String getRouteParam(SenseiRequest req)
- Specified by:
getRouteParam
in class AbstractConsistentHashBroker<SenseiRequest,SenseiSystemInfo>
getEmptyResultInstance
public SenseiSystemInfo getEmptyResultInstance()
- Specified by:
getEmptyResultInstance
in class AbstractConsistentHashBroker<SenseiRequest,SenseiSystemInfo>
- Returns:
- an empty result instance. Used when the request cannot be properly
processed or when the true result is empty.
setTimeoutMillis
public void setTimeoutMillis(long timeoutMillis)
- Specified by:
setTimeoutMillis
in class AbstractConsistentHashBroker<SenseiRequest,SenseiSystemInfo>
getTimeoutMillis
public long getTimeoutMillis()
- Specified by:
getTimeoutMillis
in class AbstractConsistentHashBroker<SenseiRequest,SenseiSystemInfo>
handleClusterConnected
public void handleClusterConnected(Set<com.linkedin.norbert.javacompat.cluster.Node> nodes)
handleClusterDisconnected
public void handleClusterDisconnected()
handleClusterNodesChanged
public void handleClusterNodesChanged(Set<com.linkedin.norbert.javacompat.cluster.Node> nodes)
handleClusterShutdown
public void handleClusterShutdown()
Copyright © 2010-2012. All Rights Reserved.