Class CloseUtils

java.lang.Object
org.elasticsearch.index.CloseUtils

public class CloseUtils extends Object
Utilities to help with closing shards and indices
  • Field Details

    • NO_SHARDS_CREATED_EXECUTOR

      public static final Executor NO_SHARDS_CREATED_EXECUTOR
      Utility shard-close executor for the cases where we close an IndexService without having created any shards, so we can assert that it's never used.
  • Method Details

    • executeDirectly

      public static void executeDirectly(CheckedConsumer<ActionListener<Void>,IOException> action) throws IOException
      Execute a naturally-async action (e.g. to close a shard) but using the current thread so that it completes synchronously, re-throwing any exception that might be passed to its listener.
      Throws:
      IOException