Class NativeIOJni
- java.lang.Object
-
- org.apache.bookkeeper.common.util.nativeio.NativeIOJni
-
class NativeIOJni extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description NativeIOJni()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static int
close(int fd)
(package private) static int
fallocate(int fd, int mode, long offset, long len)
fallocate is a linux-only syscall, so callers must handle the possibility that it does not exist.(package private) static void
free(long pointer)
(package private) static int
fsync(int fd)
(package private) static long
lseek(int fd, long offset, int whence)
(package private) static int
open(java.lang.String pathname, int flags, int mode)
(package private) static int
posix_fadvise(int fd, long offset, long len, int flag)
(package private) static long
posix_memalign(int alignment, int size)
(package private) static long
pread(int fd, long pointer, long size, long offset)
(package private) static int
pwrite(int fd, long pointer, int count, long offset)
-
-
-
Method Detail
-
open
static int open(java.lang.String pathname, int flags, int mode) throws NativeIOException
- Throws:
NativeIOException
-
fsync
static int fsync(int fd) throws NativeIOException
- Throws:
NativeIOException
-
fallocate
static int fallocate(int fd, int mode, long offset, long len) throws NativeIOException
fallocate is a linux-only syscall, so callers must handle the possibility that it does not exist.- Throws:
NativeIOException
-
posix_fadvise
static int posix_fadvise(int fd, long offset, long len, int flag) throws NativeIOException
- Throws:
NativeIOException
-
pwrite
static int pwrite(int fd, long pointer, int count, long offset) throws NativeIOException
- Throws:
NativeIOException
-
posix_memalign
static long posix_memalign(int alignment, int size) throws NativeIOException
- Throws:
NativeIOException
-
free
static void free(long pointer) throws NativeIOException
- Throws:
NativeIOException
-
lseek
static long lseek(int fd, long offset, int whence) throws NativeIOException
- Throws:
NativeIOException
-
pread
static long pread(int fd, long pointer, long size, long offset) throws NativeIOException
- Throws:
NativeIOException
-
close
static int close(int fd) throws NativeIOException
- Throws:
NativeIOException
-
-