/** * Get an ActiveShardCount instance for the given value. The value is first validated to ensure * it is a valid shard count and throws an IllegalArgumentException if validation fails. Valid * values are any non-negative number. Directly use {@link ActiveShardCount#DEFAULT} for the * default value (which is one shard copy) or {@link ActiveShardCount#ALL} to specify all the shards. */ public static ActiveShardCount from(final int value) { if (value < 0) { throw new IllegalArgumentException("shard count cannot be a negative value"); } return get(value); }
public static ActiveShardCount readFrom(final StreamInput in) throws IOException { return get(in.readInt()); }
/** * Get an ActiveShardCount instance for the given value. The value is first validated to ensure * it is a valid shard count and throws an IllegalArgumentException if validation fails. Valid * values are any non-negative number. Directly use {@link ActiveShardCount#DEFAULT} for the * default value (which is one shard copy) or {@link ActiveShardCount#ALL} to specify all the shards. */ public static ActiveShardCount from(final int value) { if (value < 0) { throw new IllegalArgumentException("shard count cannot be a negative value"); } return get(value); }
/** * Get an ActiveShardCount instance for the given value. The value is first validated to ensure * it is a valid shard count and throws an IllegalArgumentException if validation fails. Valid * values are any non-negative number. Directly use {@link ActiveShardCount#DEFAULT} for the * default value (which is one shard copy) or {@link ActiveShardCount#ALL} to specify all the shards. */ public static ActiveShardCount from(final int value) { if (value < 0) { throw new IllegalArgumentException("shard count cannot be a negative value"); } return get(value); }
/** * Get an ActiveShardCount instance for the given value. The value is first validated to ensure * it is a valid shard count and throws an IllegalArgumentException if validation fails. Valid * values are any non-negative number. Directly use {@link ActiveShardCount#DEFAULT} for the * default value (which is one shard copy) or {@link ActiveShardCount#ALL} to specify all the shards. */ public static ActiveShardCount from(final int value) { if (value < 0) { throw new IllegalArgumentException("shard count cannot be a negative value"); } return get(value); }
public static ActiveShardCount readFrom(final StreamInput in) throws IOException { return get(in.readInt()); }
public static ActiveShardCount readFrom(final StreamInput in) throws IOException { return get(in.readInt()); }
public static ActiveShardCount readFrom(final StreamInput in) throws IOException { return get(in.readInt()); }