I don't think that compiles. `bulkSize` is an `int` (as demonstrated by the second part of the `if` statement).

The `Builder` and constructor somewhat misleadingly use `bulkSize` as a `ByteSizeValue`, but the constructor converts it to `this.bulkSize = bulkSize.bytesAsInt();`