org.elasticsearch.indices
Class InternalIndicesService

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

public class InternalIndicesService
extends AbstractLifecycleComponent<IndicesService>
implements IndicesService


Field Summary
 
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
InternalIndicesService(Settings settings, NodeEnvironment nodeEnv, ThreadPool threadPool, IndicesLifecycle indicesLifecycle, IndicesAnalysisService indicesAnalysisService, IndicesStore indicesStore, Injector injector)
           
 
Method Summary
 boolean changesAllowed()
          Returns true if changes (adding / removing) indices, shards and so on are allowed.
 void cleanIndex(String index, String reason)
          Cleans the index without actually deleting any content for it.
 IndexService createIndex(String sIndexName, Settings settings, String localNodeId)
           
 void deleteIndex(String index, String reason)
           
protected  void doClose()
           
protected  void doStart()
           
protected  void doStop()
           
 boolean hasIndex(String index)
           
 IndexService indexService(String index)
           
 IndexService indexServiceSafe(String index)
           
 Set<String> indices()
           
 IndicesLifecycle indicesLifecycle()
           
 com.google.common.collect.UnmodifiableIterator<IndexService> iterator()
           
 NodeIndicesStats stats(boolean includePrevious)
          Returns the node stats indices stats.
 
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
 
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
 
Methods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
 
Methods inherited from interface org.elasticsearch.common.component.CloseableComponent
close
 

Constructor Detail

InternalIndicesService

@Inject
public InternalIndicesService(Settings settings,
                                     NodeEnvironment nodeEnv,
                                     ThreadPool threadPool,
                                     IndicesLifecycle indicesLifecycle,
                                     IndicesAnalysisService indicesAnalysisService,
                                     IndicesStore indicesStore,
                                     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

stats

public NodeIndicesStats stats(boolean includePrevious)
Description copied from interface: IndicesService
Returns the node stats indices stats. The includePrevious flag controls if old shards stats will be aggregated as well (only for relevant stats, such as refresh and indexing, not for docs/store).

Specified by:
stats 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 Iterable<IndexService>

hasIndex

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

indices

public Set<String> indices()
Specified by:
indices in interface IndicesService

indexService

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

indexServiceSafe

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

createIndex

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

cleanIndex

public void cleanIndex(String index,
                       String reason)
                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(String index,
                        String reason)
                 throws ElasticSearchException
Specified by:
deleteIndex in interface IndicesService
Throws:
ElasticSearchException


Copyright © 2009-2012. All Rights Reserved.