org.elasticsearch.indices
Class InternalIndicesService

java.lang.Object
  extended by org.elasticsearch.util.component.AbstractComponent
      extended by org.elasticsearch.util.component.AbstractLifecycleComponent<IndicesService>
          extended by org.elasticsearch.indices.InternalIndicesService
All Implemented Interfaces:
java.lang.Iterable<IndexService>, IndicesService, CloseableComponent, LifecycleComponent<IndicesService>

@ThreadSafe
public class InternalIndicesService
extends AbstractLifecycleComponent<IndicesService>
implements IndicesService


Field Summary
 
Fields inherited from class org.elasticsearch.util.component.AbstractLifecycleComponent
lifecycle
 
Fields inherited from class org.elasticsearch.util.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
InternalIndicesService(Settings settings, IndicesClusterStateService clusterStateService, IndicesLifecycle indicesLifecycle, com.google.inject.Injector injector)
           
 
Method Summary
 boolean changesAllowed()
          Returns true if changes (adding / removing) indices, shards and so on are allowed.
 IndexService createIndex(java.lang.String sIndexName, Settings settings, java.lang.String localNodeId)
           
 void deleteIndex(java.lang.String index)
           
protected  void doClose()
           
protected  void doStart()
           
protected  void doStop()
           
 boolean hasIndex(java.lang.String index)
           
 IndexService indexService(java.lang.String index)
           
 IndexService indexServiceSafe(java.lang.String index)
           
 java.util.Set<java.lang.String> indices()
           
 IndicesLifecycle indicesLifecycle()
           
 com.google.common.collect.UnmodifiableIterator<IndexService> iterator()
           
 GroupShardsIterator searchShards(ClusterState clusterState, java.lang.String[] indexNames, java.lang.String queryHint)
          Gets all the "searchable" shards on all the given indices.
 
Methods inherited from class org.elasticsearch.util.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
 
Methods inherited from class org.elasticsearch.util.component.AbstractComponent
nodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.elasticsearch.util.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
 
Methods inherited from interface org.elasticsearch.util.component.CloseableComponent
close
 

Constructor Detail

InternalIndicesService

@Inject
public InternalIndicesService(Settings settings,
                                     IndicesClusterStateService clusterStateService,
                                     IndicesLifecycle indicesLifecycle,
                                     com.google.inject.Injector injector)
Method Detail

doStart

protected void doStart()
                throws ElasticSearchException
Specified by:
doStart in class AbstractLifecycleComponent<IndicesService>
Throws:
ElasticSearchException

doStop

protected void doStop()
               throws ElasticSearchException
Specified by:
doStop in class AbstractLifecycleComponent<IndicesService>
Throws:
ElasticSearchException

doClose

protected void doClose()
                throws ElasticSearchException
Specified by:
doClose in class AbstractLifecycleComponent<IndicesService>
Throws:
ElasticSearchException

indicesLifecycle

public IndicesLifecycle indicesLifecycle()
Specified by:
indicesLifecycle in interface IndicesService

changesAllowed

public boolean changesAllowed()
Returns true if changes (adding / removing) indices, shards and so on are allowed.

Specified by:
changesAllowed in interface IndicesService

iterator

public com.google.common.collect.UnmodifiableIterator<IndexService> iterator()
Specified by:
iterator in interface java.lang.Iterable<IndexService>

hasIndex

public boolean hasIndex(java.lang.String index)
Specified by:
hasIndex in interface IndicesService

indices

public java.util.Set<java.lang.String> indices()
Specified by:
indices in interface IndicesService

indexService

public IndexService indexService(java.lang.String index)
Specified by:
indexService in interface IndicesService

indexServiceSafe

public IndexService indexServiceSafe(java.lang.String index)
                              throws IndexMissingException
Specified by:
indexServiceSafe in interface IndicesService
Throws:
IndexMissingException

searchShards

public GroupShardsIterator searchShards(ClusterState clusterState,
                                        java.lang.String[] indexNames,
                                        java.lang.String queryHint)
                                 throws ElasticSearchException
Description copied from interface: IndicesService
Gets all the "searchable" shards on all the given indices.

Specified by:
searchShards in interface IndicesService
Throws:
ElasticSearchException
See Also:
OperationRouting.searchShards(org.elasticsearch.cluster.ClusterState, String)

createIndex

public IndexService createIndex(java.lang.String sIndexName,
                                Settings settings,
                                java.lang.String localNodeId)
                         throws ElasticSearchException
Specified by:
createIndex in interface IndicesService
Throws:
ElasticSearchException

deleteIndex

public void deleteIndex(java.lang.String index)
                 throws ElasticSearchException
Specified by:
deleteIndex in interface IndicesService
Throws:
ElasticSearchException