org.elasticsearch.indices
Class InternalIndicesService
java.lang.Object
org.elasticsearch.common.component.AbstractComponent
org.elasticsearch.common.component.AbstractLifecycleComponent<IndicesService>
org.elasticsearch.indices.InternalIndicesService
- All Implemented Interfaces:
- java.lang.Iterable<IndexService>, CloseableComponent, LifecycleComponent<IndicesService>, IndicesService
@ThreadSafe
public class InternalIndicesService
- extends AbstractLifecycleComponent<IndicesService>
- implements IndicesService
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InternalIndicesService
@Inject
public InternalIndicesService(Settings settings,
ThreadPool threadPool,
IndicesLifecycle indicesLifecycle,
IndicesAnalysisService indicesAnalysisService,
IndicesStore indicesStore,
org.elasticsearch.common.inject.Injector injector)
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 org.elasticsearch.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
cleanIndex
public void cleanIndex(java.lang.String index)
throws ElasticSearchException
- Description copied from interface:
IndicesService
- Cleans the index without actually deleting any content for it.
- Specified by:
cleanIndex
in interface IndicesService
- Throws:
ElasticSearchException
deleteIndex
public void deleteIndex(java.lang.String index)
throws ElasticSearchException
- Specified by:
deleteIndex
in interface IndicesService
- Throws:
ElasticSearchException