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 intclose(int fd)intfallocate(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.voidfree(long pointer)intfsync(int fd)longlseek(int fd, long offset, int whence)intopen(java.lang.String pathname, int flags, int mode)intposix_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.longposix_memalign(int alignment, int size)longpread(int fd, long pointer, long size, long offset)intpwrite(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:
openin interfaceNativeIO- Throws:
NativeIOException
-
fsync
public int fsync(int fd) throws NativeIOException- Specified by:
fsyncin interfaceNativeIO- Throws:
NativeIOException
-
fallocate
public int fallocate(int fd, int mode, long offset, long len) throws NativeIOExceptionDescription copied from interface:NativeIOfallocate is a linux-only syscall, so callers must handle the possibility that it does not exist.- Specified by:
fallocatein interfaceNativeIO- Throws:
NativeIOException
-
posix_fadvise
public int posix_fadvise(int fd, long offset, long len, int flag) throws NativeIOExceptionDescription copied from interface:NativeIOposix_fadvise is a linux-only syscall, so callers must handle the possibility that it does not exist.- Specified by:
posix_fadvisein interfaceNativeIO- Throws:
NativeIOException
-
lseek
public long lseek(int fd, long offset, int whence) throws NativeIOException- Specified by:
lseekin interfaceNativeIO- Throws:
NativeIOException
-
close
public int close(int fd) throws NativeIOException- Specified by:
closein interfaceNativeIO- Throws:
NativeIOException
-
pwrite
public int pwrite(int fd, long pointer, int count, long offset) throws NativeIOException- Specified by:
pwritein interfaceNativeIO- Throws:
NativeIOException
-
posix_memalign
public long posix_memalign(int alignment, int size) throws NativeIOException- Specified by:
posix_memalignin interfaceNativeIO- Throws:
NativeIOException
-
free
public void free(long pointer) throws NativeIOException- Specified by:
freein interfaceNativeIO- Throws:
NativeIOException
-
pread
public long pread(int fd, long pointer, long size, long offset) throws NativeIOException- Specified by:
preadin interfaceNativeIO- Throws:
NativeIOException
-
-