org.elasticsearch.index.service
Class InternalIndexService

java.lang.Object
  extended by org.elasticsearch.index.AbstractIndexComponent
      extended by org.elasticsearch.index.service.InternalIndexService
All Implemented Interfaces:
java.lang.Iterable<IndexShard>, CloseableIndexComponent, IndexComponent, IndexService

public class InternalIndexService
extends AbstractIndexComponent
implements IndexService


Field Summary
 
Fields inherited from class org.elasticsearch.index.AbstractIndexComponent
componentSettings, index, logger
 
Constructor Summary
InternalIndexService(org.elasticsearch.common.inject.Injector injector, Index index, Settings indexSettings, NodeEnvironment nodeEnv, ThreadPool threadPool, MapperService mapperService, IndexQueryParserService queryParserService, SimilarityService similarityService, IndexCache indexCache, IndexEngine indexEngine, IndexGateway indexGateway, IndexStore indexStore)
           
 
Method Summary
 IndexCache cache()
           
 void cleanShard(int shardId)
          Cleans the shard locally, does not touch the gateway!.
 void close(boolean delete)
          Closes the index component.
 IndexShard createShard(int sShardId)
           
 IndexEngine engine()
           
 IndexGateway gateway()
           
 boolean hasShard(int shardId)
           
 org.elasticsearch.common.inject.Injector injector()
           
 org.elasticsearch.common.collect.UnmodifiableIterator<IndexShard> iterator()
           
 MapperService mapperService()
           
 int numberOfShards()
           
 IndexQueryParserService queryParserService()
           
 void removeShard(int shardId)
          Removes the shard, does not delete local data or the gateway.
 IndexShard shard(int shardId)
           
 org.elasticsearch.common.collect.ImmutableSet<java.lang.Integer> shardIds()
           
 org.elasticsearch.common.inject.Injector shardInjector(int shardId)
           
 org.elasticsearch.common.inject.Injector shardInjectorSafe(int shardId)
           
 IndexShard shardSafe(int shardId)
           
 SimilarityService similarityService()
           
 IndexStore store()
           
 
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
 
Methods inherited from interface org.elasticsearch.index.IndexComponent
index
 

Constructor Detail

InternalIndexService

@Inject
public InternalIndexService(org.elasticsearch.common.inject.Injector injector,
                                   Index index,
                                   @IndexSettings
                                   Settings indexSettings,
                                   NodeEnvironment nodeEnv,
                                   ThreadPool threadPool,
                                   MapperService mapperService,
                                   IndexQueryParserService queryParserService,
                                   SimilarityService similarityService,
                                   IndexCache indexCache,
                                   IndexEngine indexEngine,
                                   IndexGateway indexGateway,
                                   IndexStore indexStore)
Method Detail

numberOfShards

public int numberOfShards()
Specified by:
numberOfShards in interface IndexService

iterator

public org.elasticsearch.common.collect.UnmodifiableIterator<IndexShard> iterator()
Specified by:
iterator in interface java.lang.Iterable<IndexShard>

hasShard

public boolean hasShard(int shardId)
Specified by:
hasShard in interface IndexService

shard

public IndexShard shard(int shardId)
Specified by:
shard in interface IndexService

shardSafe

public IndexShard shardSafe(int shardId)
                     throws IndexShardMissingException
Specified by:
shardSafe in interface IndexService
Throws:
IndexShardMissingException

shardIds

public org.elasticsearch.common.collect.ImmutableSet<java.lang.Integer> shardIds()
Specified by:
shardIds in interface IndexService

injector

public org.elasticsearch.common.inject.Injector injector()
Specified by:
injector in interface IndexService

gateway

public IndexGateway gateway()
Specified by:
gateway in interface IndexService

store

public IndexStore store()
Specified by:
store in interface IndexService

cache

public IndexCache cache()
Specified by:
cache in interface IndexService

mapperService

public MapperService mapperService()
Specified by:
mapperService in interface IndexService

queryParserService

public IndexQueryParserService queryParserService()
Specified by:
queryParserService in interface IndexService

similarityService

public SimilarityService similarityService()
Specified by:
similarityService in interface IndexService

engine

public IndexEngine engine()
Specified by:
engine in interface IndexService

close

public void close(boolean delete)
Description copied from interface: CloseableIndexComponent
Closes the index component. A boolean indicating if its part of an actual index deletion or not is passed.

Specified by:
close in interface CloseableIndexComponent
Parameters:
delete - true if the index is being deleted.

shardInjector

public org.elasticsearch.common.inject.Injector shardInjector(int shardId)
                                                       throws ElasticSearchException
Specified by:
shardInjector in interface IndexService
Throws:
ElasticSearchException

shardInjectorSafe

public org.elasticsearch.common.inject.Injector shardInjectorSafe(int shardId)
                                                           throws IndexShardMissingException
Specified by:
shardInjectorSafe in interface IndexService
Throws:
IndexShardMissingException

createShard

public IndexShard createShard(int sShardId)
                       throws ElasticSearchException
Specified by:
createShard in interface IndexService
Throws:
ElasticSearchException

cleanShard

public void cleanShard(int shardId)
                throws ElasticSearchException
Description copied from interface: IndexService
Cleans the shard locally, does not touch the gateway!.

Specified by:
cleanShard in interface IndexService
Throws:
ElasticSearchException

removeShard

public void removeShard(int shardId)
                 throws ElasticSearchException
Description copied from interface: IndexService
Removes the shard, does not delete local data or the gateway.

Specified by:
removeShard in interface IndexService
Throws:
ElasticSearchException