public class ShardSelection
extends java.lang.Object
implements java.lang.Iterable<SolrClient>
Modifier and Type | Class and Description |
---|---|
static class |
ShardSelection.Method |
Modifier and Type | Field and Description |
---|---|
private int |
dimension |
private ShardSelection.Method |
method |
private java.util.ArrayList<SolrClient> |
server |
private java.util.concurrent.atomic.AtomicLong |
shardID |
Constructor and Description |
---|
ShardSelection(java.util.ArrayList<SolrClient> server,
ShardSelection.Method method) |
Modifier and Type | Method and Description |
---|---|
ShardSelection.Method |
getMethod() |
java.util.Iterator<SolrClient> |
iterator()
return all solr server
|
private int |
selectRoundRobin() |
java.util.List<SolrClient> |
server4read() |
SolrClient |
server4write(SolrInputDocument solrdoc) |
SolrClient |
server4write(java.lang.String host) |
SolrClient |
server4write(java.net.URL url) |
private final ShardSelection.Method method
private final java.util.concurrent.atomic.AtomicLong shardID
private final int dimension
private final java.util.ArrayList<SolrClient> server
public ShardSelection(java.util.ArrayList<SolrClient> server, ShardSelection.Method method)
public ShardSelection.Method getMethod()
private int selectRoundRobin()
public SolrClient server4write(SolrInputDocument solrdoc) throws java.io.IOException
java.io.IOException
public SolrClient server4write(java.lang.String host) throws java.io.IOException
java.io.IOException
public SolrClient server4write(java.net.URL url) throws java.io.IOException
java.io.IOException
public java.util.List<SolrClient> server4read()
public java.util.Iterator<SolrClient> iterator()
iterator
in interface java.lang.Iterable<SolrClient>