org.elasticsearch.indices
Class IndicesLifecycle.Listener

java.lang.Object
  extended by org.elasticsearch.indices.IndicesLifecycle.Listener
Enclosing interface:
IndicesLifecycle

public abstract static class IndicesLifecycle.Listener
extends Object

A listener for index and index shard lifecycle events (create/closed).


Constructor Summary
IndicesLifecycle.Listener()
           
 
Method Summary
 void afterIndexClosed(Index index, boolean delete)
          Called after the index has been closed.
 void afterIndexCreated(IndexService indexService)
          Called after the index has been created.
 void afterIndexShardClosed(ShardId shardId, boolean delete)
          Called after the index shard has been closed.
 void afterIndexShardCreated(IndexShard indexShard)
          Called after the index shard has been created.
 void afterIndexShardStarted(IndexShard indexShard)
          Called after the index shard has been started.
 void beforeIndexClosed(IndexService indexService, boolean delete)
          Called before the index get closed.
 void beforeIndexCreated(Index index)
          Called before the index gets created.
 void beforeIndexShardClosed(ShardId shardId, IndexShard indexShard, boolean delete)
          Called before the index shard gets closed.
 void beforeIndexShardCreated(ShardId shardId)
          Called before the index shard gets created.
 void shardRoutingChanged(IndexShard indexShard, ShardRouting oldRouting, ShardRouting newRouting)
          Called when the shard routing has changed state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndicesLifecycle.Listener

public IndicesLifecycle.Listener()
Method Detail

shardRoutingChanged

public void shardRoutingChanged(IndexShard indexShard,
                                @Nullable
                                ShardRouting oldRouting,
                                ShardRouting newRouting)
Called when the shard routing has changed state.

Parameters:
indexShard - The index shard
oldRouting - The old routing state (can be null)
newRouting - The new routing state

beforeIndexCreated

public void beforeIndexCreated(Index index)
Called before the index gets created.


afterIndexCreated

public void afterIndexCreated(IndexService indexService)
Called after the index has been created.


beforeIndexShardCreated

public void beforeIndexShardCreated(ShardId shardId)
Called before the index shard gets created.


afterIndexShardCreated

public void afterIndexShardCreated(IndexShard indexShard)
Called after the index shard has been created.


afterIndexShardStarted

public void afterIndexShardStarted(IndexShard indexShard)
Called after the index shard has been started.


beforeIndexClosed

public void beforeIndexClosed(IndexService indexService,
                              boolean delete)
Called before the index get closed.

Parameters:
indexService - The index service
delete - Does the index gets closed because of a delete command, or because the node is shutting down

afterIndexClosed

public void afterIndexClosed(Index index,
                             boolean delete)
Called after the index has been closed.

Parameters:
index - The index
delete - Does the index gets closed because of a delete command, or because the node is shutting down

beforeIndexShardClosed

public void beforeIndexShardClosed(ShardId shardId,
                                   @Nullable
                                   IndexShard indexShard,
                                   boolean delete)
Called before the index shard gets closed.

Parameters:
indexShard - The index shard
delete - Does the index shard gets closed because of a delete command, or because the node is shutting down

afterIndexShardClosed

public void afterIndexShardClosed(ShardId shardId,
                                  boolean delete)
Called after the index shard has been closed.

Parameters:
shardId - The shard id
delete - Does the index shard gets closed because of a delete command, or because the node is shutting down


Copyright © 2009-2012. All Rights Reserved.