public class StoreFileChannel extends Object implements StoreChannel
| Constructor and Description |
|---|
StoreFileChannel(FileChannel channel) |
StoreFileChannel(StoreFileChannel channel) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
force(boolean metaData) |
boolean |
isOpen() |
long |
position() |
StoreFileChannel |
position(long newPosition) |
int |
read(ByteBuffer dst) |
long |
read(ByteBuffer[] dsts) |
long |
read(ByteBuffer[] dsts,
int offset,
int length) |
int |
read(ByteBuffer dst,
long position) |
long |
size() |
StoreFileChannel |
truncate(long size) |
FileLock |
tryLock()
Attempts to acquire an exclusive lock on this channel's file.
|
int |
write(ByteBuffer src) |
long |
write(ByteBuffer[] srcs) |
long |
write(ByteBuffer[] srcs,
int offset,
int length) |
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.
|
public StoreFileChannel(FileChannel channel)
public StoreFileChannel(StoreFileChannel channel)
public long write(ByteBuffer[] srcs) throws IOException
write in interface GatheringByteChannelIOExceptionpublic int write(ByteBuffer src, long position) throws IOException
StoreChannelwrite in interface StoreChannelIOExceptionpublic long write(ByteBuffer[] srcs, int offset, int length) throws IOException
write in interface GatheringByteChannelIOExceptionpublic void writeAll(ByteBuffer src, long position) throws IOException
StoreChannelwriteAll in interface StoreChannelIOExceptionpublic void writeAll(ByteBuffer src) throws IOException
StoreChannelwriteAll in interface StoreChannelIOExceptionpublic StoreFileChannel truncate(long size) throws IOException
truncate in interface SeekableByteChanneltruncate in interface StoreChannelIOExceptionpublic StoreFileChannel position(long newPosition) throws IOException
position in interface SeekableByteChannelposition in interface StoreChannelIOExceptionpublic int read(ByteBuffer dst, long position) throws IOException
read in interface StoreChannelIOExceptionFileChannel.read(java.nio.ByteBuffer, long)public void force(boolean metaData)
throws IOException
force in interface StoreChannelIOExceptionpublic int read(ByteBuffer dst) throws IOException
read in interface ReadableByteChannelread in interface SeekableByteChannelIOExceptionpublic long read(ByteBuffer[] dsts, int offset, int length) throws IOException
read in interface ScatteringByteChannelIOExceptionpublic long position()
throws IOException
position in interface SeekableByteChannelIOExceptionpublic FileLock tryLock() throws IOException
StoreChanneltryLock in interface StoreChannelIOException - If an I/O error occurs.ClosedChannelException - if the channel is closed.public long read(ByteBuffer[] dsts) throws IOException
read in interface ScatteringByteChannelIOExceptionpublic int write(ByteBuffer src) throws IOException
write in interface SeekableByteChannelwrite in interface WritableByteChannelIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface Channelclose in interface InterruptibleChannelIOExceptionpublic long size()
throws IOException
size in interface SeekableByteChannelIOExceptionpublic void flush()
throws IOException
flush in interface FlushableIOExceptionCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.