Sets the maximum time (in milliseconds) for which edits can be buffered. This interval will be honored on a "best-effort" basis. Edits can be buffered for longer than that due to GC pauses, the resolution of the underlying timer, thread scheduling at the OS level (particularly if the OS is over
(final short flush_interval)
| 889 | * @throws IllegalArgumentException if {@code flush_interval < 0}. |
| 890 | */ |
| 891 | public short setFlushInterval(final short flush_interval) { |
| 892 | // Note: if we have buffered increments, they'll pick up the new flush |
| 893 | // interval next time the current timer fires. |
| 894 | if (flush_interval < 0) { |
| 895 | throw new IllegalArgumentException("Negative: " + flush_interval); |
| 896 | } |
| 897 | final short prev = config.getShort("hbase.rpcs.buffered_flush_interval"); |
| 898 | config.overrideConfig("hbase.rpcs.buffered_flush_interval", |
| 899 | Short.toString(flush_interval)); |
| 900 | this.flush_interval = flush_interval; |
| 901 | return prev; |
| 902 | } |
| 903 | |
| 904 | /** |
| 905 | * Changes the size of the increment buffer. |