Class AlignedBuffersDirectFileIO
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.file.AbstractFileIO
-
- org.apache.ignite.internal.processors.cache.persistence.file.AlignedBuffersDirectFileIO
-
- All Implemented Interfaces:
AutoCloseable,FileIO
public class AlignedBuffersDirectFileIO extends AbstractFileIO
Limited capabilities Direct IO, which enables file write and read using aligned buffers and O_DIRECT mode. Works only for Linux
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voidclose()voidforce()voidforce(boolean withMetadata)intgetFileSystemBlockSize()longgetSparseSize()MappedByteBuffermap(int sizeBytes)longposition()voidposition(long newPosition)intpunchHole(long position, int len)intread(byte[] buf, int off, int len)intread(ByteBuffer destBuf)intread(ByteBuffer destBuf, long filePosition)longsize()intwrite(byte[] buf, int off, int len)intwrite(ByteBuffer srcBuf)intwrite(ByteBuffer srcBuf, long filePosition)-
Methods inherited from class org.apache.ignite.internal.processors.cache.persistence.file.AbstractFileIO
readFully, readFully, readFully, writeFully, writeFully, writeFully
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.processors.cache.persistence.file.FileIO
transferFrom, transferTo
-
-
-
-
Method Detail
-
getFileSystemBlockSize
public int getFileSystemBlockSize()
-
getSparseSize
public long getSparseSize()
-
punchHole
public int punchHole(long position, int len)
-
position
public long position() throws IOException- Throws:
IOException
-
position
public void position(long newPosition) throws IOException- Throws:
IOException
-
read
public int read(ByteBuffer destBuf) throws IOException
- Throws:
IOException
-
read
public int read(ByteBuffer destBuf, long filePosition) throws IOException
- Throws:
IOException
-
read
public int read(byte[] buf, int off, int len) throws IOException- Throws:
IOException
-
write
public int write(ByteBuffer srcBuf) throws IOException
- Throws:
IOException
-
write
public int write(ByteBuffer srcBuf, long filePosition) throws IOException
- Throws:
IOException
-
write
public int write(byte[] buf, int off, int len) throws IOException- Throws:
IOException
-
map
public MappedByteBuffer map(int sizeBytes) throws IOException
- Throws:
IOException
-
force
public void force() throws IOException- Throws:
IOException
-
force
public void force(boolean withMetadata) throws IOException- Throws:
IOException
-
size
public long size() throws IOException- Throws:
IOException
-
clear
public void clear() throws IOException- Throws:
IOException
-
close
public void close() throws IOException- Throws:
IOException
-
-