Class NativeIOImpl
- java.lang.Object
-
- org.apache.bookkeeper.common.util.nativeio.NativeIOImpl
-
-
Constructor Summary
Constructors Constructor Description NativeIOImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
close(int fd)
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.void
free(long pointer)
int
fsync(int fd)
long
lseek(int fd, long offset, int whence)
int
open(java.lang.String pathname, int flags, int mode)
int
posix_fadvise(int fd, long offset, long len, int flag)
posix_fadvise is a linux-only syscall, so callers must handle the possibility that it does not exist.long
posix_memalign(int alignment, int size)
long
pread(int fd, long pointer, long size, long offset)
int
pwrite(int fd, long pointer, int count, long offset)
-
-
-
Method Detail
-
open
public int open(java.lang.String pathname, int flags, int mode) throws NativeIOException
- Specified by:
open
in interfaceNativeIO
- Throws:
NativeIOException
-
fsync
public int fsync(int fd) throws NativeIOException
- Specified by:
fsync
in interfaceNativeIO
- Throws:
NativeIOException
-
fallocate
public int fallocate(int fd, int mode, long offset, long len) throws NativeIOException
Description copied from interface:NativeIO
fallocate is a linux-only syscall, so callers must handle the possibility that it does not exist.- Specified by:
fallocate
in interfaceNativeIO
- Throws:
NativeIOException
-
posix_fadvise
public int posix_fadvise(int fd, long offset, long len, int flag) throws NativeIOException
Description copied from interface:NativeIO
posix_fadvise is a linux-only syscall, so callers must handle the possibility that it does not exist.- Specified by:
posix_fadvise
in interfaceNativeIO
- Throws:
NativeIOException
-
lseek
public long lseek(int fd, long offset, int whence) throws NativeIOException
- Specified by:
lseek
in interfaceNativeIO
- Throws:
NativeIOException
-
close
public int close(int fd) throws NativeIOException
- Specified by:
close
in interfaceNativeIO
- Throws:
NativeIOException
-
pwrite
public int pwrite(int fd, long pointer, int count, long offset) throws NativeIOException
- Specified by:
pwrite
in interfaceNativeIO
- Throws:
NativeIOException
-
posix_memalign
public long posix_memalign(int alignment, int size) throws NativeIOException
- Specified by:
posix_memalign
in interfaceNativeIO
- Throws:
NativeIOException
-
free
public void free(long pointer) throws NativeIOException
- Specified by:
free
in interfaceNativeIO
- Throws:
NativeIOException
-
pread
public long pread(int fd, long pointer, long size, long offset) throws NativeIOException
- Specified by:
pread
in interfaceNativeIO
- Throws:
NativeIOException
-
-