protected boolean shardAvailable(@Nullable IndexShard shard){
  return shard != null && shard.canIndex() && CAN_UPDATE_INDEX_BUFFER_STATES.contains(shard.state());
}

protected boolean shardAvailable ( @ Nullable IndexShard shard ) { return shard != null && shard . canIndex ( ) && CAN_UPDATE_INDEX_BUFFER_STATES . contains ( shard . state ( ) ) ; }
returns true if shard exists and is availabe for updates
