org.elasticsearch.cluster.routing.operation.plain
Class PlainOperationRouting

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.cluster.routing.operation.plain.PlainOperationRouting
All Implemented Interfaces:
OperationRouting

public class PlainOperationRouting
extends AbstractComponent
implements OperationRouting


Field Summary
static java.util.regex.Pattern routingPattern
           
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
PlainOperationRouting(Settings indexSettings, HashFunction hashFunction)
           
 
Method Summary
 GroupShardsIterator broadcastDeleteShards(ClusterState clusterState, java.lang.String index)
           
 GroupShardsIterator deleteByQueryShards(ClusterState clusterState, java.lang.String index, java.lang.String routing)
           
 ShardsIterator deleteShards(ClusterState clusterState, java.lang.String index, java.lang.String type, java.lang.String id, java.lang.String routing)
           
 ShardsIterator getShards(ClusterState clusterState, java.lang.String index, java.lang.String type, java.lang.String id, java.lang.String routing)
           
protected  int hash(java.lang.String routing)
           
protected  int hash(java.lang.String type, java.lang.String id)
           
 IndexMetaData indexMetaData(ClusterState clusterState, java.lang.String index)
           
protected  IndexRoutingTable indexRoutingTable(ClusterState clusterState, java.lang.String index)
           
 ShardsIterator indexShards(ClusterState clusterState, java.lang.String index, java.lang.String type, java.lang.String id, java.lang.String routing)
           
 GroupShardsIterator searchShards(ClusterState clusterState, java.lang.String[] indices, java.lang.String queryHint, java.lang.String routing)
           
protected  IndexShardRoutingTable shards(ClusterState clusterState, java.lang.String index, java.lang.String type, java.lang.String id, java.lang.String routing)
           
 
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
nodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

routingPattern

public static final java.util.regex.Pattern routingPattern
Constructor Detail

PlainOperationRouting

@Inject
public PlainOperationRouting(Settings indexSettings,
                                    HashFunction hashFunction)
Method Detail

indexShards

public ShardsIterator indexShards(ClusterState clusterState,
                                  java.lang.String index,
                                  java.lang.String type,
                                  java.lang.String id,
                                  @Nullable
                                  java.lang.String routing)
                           throws IndexMissingException,
                                  IndexShardMissingException
Specified by:
indexShards in interface OperationRouting
Throws:
IndexMissingException
IndexShardMissingException

deleteShards

public ShardsIterator deleteShards(ClusterState clusterState,
                                   java.lang.String index,
                                   java.lang.String type,
                                   java.lang.String id,
                                   @Nullable
                                   java.lang.String routing)
                            throws IndexMissingException,
                                   IndexShardMissingException
Specified by:
deleteShards in interface OperationRouting
Throws:
IndexMissingException
IndexShardMissingException

getShards

public ShardsIterator getShards(ClusterState clusterState,
                                java.lang.String index,
                                java.lang.String type,
                                java.lang.String id,
                                @Nullable
                                java.lang.String routing)
                         throws IndexMissingException,
                                IndexShardMissingException
Specified by:
getShards in interface OperationRouting
Throws:
IndexMissingException
IndexShardMissingException

broadcastDeleteShards

public GroupShardsIterator broadcastDeleteShards(ClusterState clusterState,
                                                 java.lang.String index)
                                          throws IndexMissingException
Specified by:
broadcastDeleteShards in interface OperationRouting
Throws:
IndexMissingException

deleteByQueryShards

public GroupShardsIterator deleteByQueryShards(ClusterState clusterState,
                                               java.lang.String index,
                                               @Nullable
                                               java.lang.String routing)
                                        throws IndexMissingException
Specified by:
deleteByQueryShards in interface OperationRouting
Throws:
IndexMissingException

searchShards

public GroupShardsIterator searchShards(ClusterState clusterState,
                                        java.lang.String[] indices,
                                        @Nullable
                                        java.lang.String queryHint,
                                        @Nullable
                                        java.lang.String routing)
                                 throws IndexMissingException
Specified by:
searchShards in interface OperationRouting
Throws:
IndexMissingException

indexMetaData

public IndexMetaData indexMetaData(ClusterState clusterState,
                                   java.lang.String index)

indexRoutingTable

protected IndexRoutingTable indexRoutingTable(ClusterState clusterState,
                                              java.lang.String index)

shards

protected IndexShardRoutingTable shards(ClusterState clusterState,
                                        java.lang.String index,
                                        java.lang.String type,
                                        java.lang.String id,
                                        java.lang.String routing)

hash

protected int hash(java.lang.String routing)

hash

protected int hash(java.lang.String type,
                   java.lang.String id)