setWriteSpinCount

Sets the maximum loop count for a write operation until
WritableByteChannel.write(ByteBuffer) returns a non-zero value.
It is similar to what a spin lock is used for in concurrency programming.
It improves memory utilization and write throughput depending on
the platform that JVM runs on. The default value is 16.

setWriteBufferLowWaterMark

Sets the low water mark of the write buffer. Once the number of bytes
queued in the write buffer exceeded the
high water mark and then
dropped down below this value, Channel.isWritable() will start to return
true again.