Package herddb.utils
Class OpenFileUtils
- java.lang.Object
-
- herddb.utils.OpenFileUtils
-
public class OpenFileUtils extends Object
Java 8 compatibile version. In Java 8 you cannot use O_DIRECT- Author:
- enrico.olivelli
-
-
Constructor Summary
Constructors Constructor Description OpenFileUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ByteBufferalignedSlice(ByteBuffer buffer, int alignment)static longgetBlockSize(Path p)static booleanisO_DIRECT_Supported()static FileChannelopenFileChannelWithO_DIRECT(Path path, OpenOption... options)static voidreleaseAlignedBuffer(ByteBuffer buffer)
-
-
-
Method Detail
-
openFileChannelWithO_DIRECT
public static FileChannel openFileChannelWithO_DIRECT(Path path, OpenOption... options) throws IOException
- Throws:
IOException
-
getBlockSize
public static long getBlockSize(Path p) throws IOException
- Throws:
IOException
-
isO_DIRECT_Supported
public static boolean isO_DIRECT_Supported()
-
alignedSlice
public static ByteBuffer alignedSlice(ByteBuffer buffer, int alignment)
-
releaseAlignedBuffer
public static void releaseAlignedBuffer(ByteBuffer buffer)
-
-