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 java.lang.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 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.
 
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

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.


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