private void closeInjectorResource(ShardId shardId,Injector shardInjector,Class<? extends Closeable>... toClose){
  for (  Class<? extends Closeable> closeable : toClose) {
    if (closeInjectorOptionalResource(shardId,shardInjector,closeable) == false) {
      logger.warn("[{}] no instance available for [{}], ignoring... ",shardId,closeable.getSimpleName());
    }
  }
}

private void closeInjectorResource ( ShardId shardId , Injector shardInjector , Class < ? extends Closeable > ... toClose ) { for ( Class < ? extends Closeable > closeable : toClose ) { if ( closeInjectorOptionalResource ( shardId , shardInjector , closeable ) == false ) { logger . warn ( "[{}] no instance available for [{}], ignoring... " , shardId , closeable . getSimpleName ( ) ) ; } } }
this method gets an instance for each of the given classes passed and calls # close ( ) on the returned instance . note : this method swallows all exceptions thrown from the close method of the injector and logs them as debug log
