public final class CLibrary
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static int |
close(int fd) |
static int |
fcntl(int fd,
int command,
long flags) |
static int |
fsync(int fd) |
static int |
getfd(java.io.FileDescriptor descriptor)
Get system file descriptor from FileDescriptor object.
|
static boolean |
jnaAvailable() |
static boolean |
jnaMemoryLockable() |
static int |
open(java.lang.String path,
int flags) |
static int |
posix_fadvise(int fd,
long offset,
int len,
int flag) |
static int |
preheatPage(int fd,
long position)
Suggest kernel to preheat one page for the given file.
|
static void |
tryCloseFD(int fd) |
static int |
tryFcntl(int fd,
int command,
int flags) |
static void |
tryMlockall() |
static int |
tryOpenDirectory(java.lang.String path) |
static void |
trySkipCache(int fd,
long offset,
int len) |
static void |
trySync(int fd) |
public static int fcntl(int fd, int command, long flags) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public static int posix_fadvise(int fd, long offset, int len, int flag) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public static int open(java.lang.String path, int flags) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public static int fsync(int fd) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public static int close(int fd) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public static boolean jnaAvailable()
public static boolean jnaMemoryLockable()
public static void tryMlockall()
public static void trySkipCache(int fd, long offset, int len)
public static int tryFcntl(int fd, int command, int flags)
public static int tryOpenDirectory(java.lang.String path)
public static void trySync(int fd)
public static void tryCloseFD(int fd)
public static int getfd(java.io.FileDescriptor descriptor)
descriptor
- - FileDescriptor objec to get fd frompublic static int preheatPage(int fd, long position)
fd
- The file descriptor of file to preheat.position
- The offset of the block.Copyright © 2015 The Apache Software Foundation