public interface StoreChannel extends Flushable, SeekableByteChannel, GatheringByteChannel, ScatteringByteChannel, InterruptibleChannel
| Modifier and Type | Method and Description |
|---|---|
void |
force(boolean metaData) |
StoreChannel |
position(long newPosition) |
int |
read(ByteBuffer dst,
long position) |
StoreChannel |
truncate(long size) |
FileLock |
tryLock()
Attempts to acquire an exclusive lock on this channel's file.
|
int |
write(ByteBuffer src,
long position)
NOTE: If you want to write bytes to disk, use #writeAll(), this does not guarantee all bytes will be written,
and you are responsible for handling the return value of this call (which tells you how many bytes were written).
|
void |
writeAll(ByteBuffer src)
Same as #write(), except this method will write the full contents of the buffer in chunks if the OS fails to
write it all at once.
|
void |
writeAll(ByteBuffer src,
long position)
Same as #write(), except this method will write the full contents of the buffer in chunks if the OS fails to
write it all at once.
|
position, read, size, writewrite, writeread, readcloseFileLock tryLock() throws IOException
IOException - If an I/O error occurs.ClosedChannelException - if the channel is closed.int write(ByteBuffer src, long position) throws IOException
IOExceptionvoid writeAll(ByteBuffer src, long position) throws IOException
IOExceptionvoid writeAll(ByteBuffer src) throws IOException
IOExceptionint read(ByteBuffer dst, long position) throws IOException
IOExceptionFileChannel.read(java.nio.ByteBuffer, long)void force(boolean metaData)
throws IOException
IOExceptionStoreChannel position(long newPosition) throws IOException
position in interface SeekableByteChannelIOExceptionStoreChannel truncate(long size) throws IOException
truncate in interface SeekableByteChannelIOExceptionCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.