Interface ChunkWriter.WriteCallback
- Enclosing class:
- ChunkWriter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface used to perform the uninterruptable writes when the buffer fills up.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
write(ByteBuffer buffer, long position)
Performs an uninterruptable write of the given bytes to the given file position.
-
Method Details
-
write
Performs an uninterruptable write of the given bytes to the given file position.- Parameters:
buffer
- the bytes to writeposition
- the file position to write them to- Returns:
- true iff an attempt was made to interrupt the write via
Thread.interrupt()
. Note that the write must succeed regardless of the return value. - Throws:
IOException
- if unable to perform the write
-