org.elasticsearch.index.routing.plain
Class PlainOperationRouting

java.lang.Object
  extended by org.elasticsearch.index.AbstractIndexComponent
      extended by org.elasticsearch.index.routing.plain.PlainOperationRouting
All Implemented Interfaces:
IndexComponent, OperationRouting

public class PlainOperationRouting
extends AbstractIndexComponent
implements OperationRouting


Field Summary
 
Fields inherited from class org.elasticsearch.index.AbstractIndexComponent
componentSettings, index, indexSettings, logger
 
Constructor Summary
PlainOperationRouting(Index index, Settings indexSettings, HashFunction hashFunction)
           
 
Method Summary
 GroupShardsIterator deleteByQueryShards(ClusterState clusterState)
          Returns the shards grouped by shard
 ShardsIterator deleteShards(ClusterState clusterState, java.lang.String type, java.lang.String id)
           
 ShardsIterator getShards(ClusterState clusterState, java.lang.String type, java.lang.String id)
           
protected  int hash(java.lang.String type, java.lang.String id)
           
 IndexMetaData indexMetaData(ClusterState clusterState)
           
protected  IndexRoutingTable indexRoutingTable(ClusterState clusterState)
           
 ShardsIterator indexShards(ClusterState clusterState, java.lang.String type, java.lang.String id)
           
 GroupShardsIterator searchShards(ClusterState clusterState, java.lang.String queryHint)
           
protected  IndexShardRoutingTable shards(ClusterState clusterState, java.lang.String type, java.lang.String id)
           
 
Methods inherited from class org.elasticsearch.index.AbstractIndexComponent
index, nodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainOperationRouting

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

indexShards

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

deleteShards

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

getShards

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

deleteByQueryShards

public GroupShardsIterator deleteByQueryShards(ClusterState clusterState)
                                        throws IndexMissingException
Description copied from interface: OperationRouting
Returns the shards grouped by shard

Specified by:
deleteByQueryShards in interface OperationRouting
Throws:
IndexMissingException

searchShards

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

indexMetaData

public IndexMetaData indexMetaData(ClusterState clusterState)

indexRoutingTable

protected IndexRoutingTable indexRoutingTable(ClusterState clusterState)

shards

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

hash

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