Modifier and Type | Class and Description |
---|---|
static interface |
NativeIO.POSIX.CacheTracker |
static class |
NativeIO.POSIX.Stat
Result type of the fstat call
|
Modifier and Type | Field and Description |
---|---|
static NativeIO.POSIX.CacheTracker |
cacheTracker |
static int |
O_APPEND |
static int |
O_ASYNC |
static int |
O_CREAT |
static int |
O_EXCL |
static int |
O_FSYNC |
static int |
O_NDELAY |
static int |
O_NOCTTY |
static int |
O_NONBLOCK |
static int |
O_RDONLY |
static int |
O_RDWR |
static int |
O_SYNC |
static int |
O_TRUNC |
static int |
O_WRONLY |
static int |
POSIX_FADV_DONTNEED |
static int |
POSIX_FADV_NOREUSE |
static int |
POSIX_FADV_NORMAL |
static int |
POSIX_FADV_RANDOM |
static int |
POSIX_FADV_SEQUENTIAL |
static int |
POSIX_FADV_WILLNEED |
static int |
SYNC_FILE_RANGE_WAIT_AFTER |
static int |
SYNC_FILE_RANGE_WAIT_BEFORE |
static int |
SYNC_FILE_RANGE_WRITE |
Constructor and Description |
---|
NativeIO.POSIX() |
Modifier and Type | Method and Description |
---|---|
static void |
chmod(String path,
int mode) |
static NativeIO.POSIX.Stat |
getFstat(FileDescriptor fd)
Returns the file stat for a file descriptor.
|
static boolean |
isAvailable()
Return true if the JNI-based native IO extensions are available.
|
static FileDescriptor |
open(String path,
int flags,
int mode)
Wrapper around open(2)
|
static void |
posixFadviseIfPossible(String identifier,
FileDescriptor fd,
long offset,
long len,
int flags)
Call posix_fadvise on the given file descriptor.
|
static void |
syncFileRangeIfPossible(FileDescriptor fd,
long offset,
long nbytes,
int flags)
Call sync_file_range on the given file descriptor.
|
public static final int O_RDONLY
public static final int O_WRONLY
public static final int O_RDWR
public static final int O_CREAT
public static final int O_EXCL
public static final int O_NOCTTY
public static final int O_TRUNC
public static final int O_APPEND
public static final int O_NONBLOCK
public static final int O_SYNC
public static final int O_ASYNC
public static final int O_FSYNC
public static final int O_NDELAY
public static final int POSIX_FADV_NORMAL
public static final int POSIX_FADV_RANDOM
public static final int POSIX_FADV_SEQUENTIAL
public static final int POSIX_FADV_WILLNEED
public static final int POSIX_FADV_DONTNEED
public static final int POSIX_FADV_NOREUSE
public static final int SYNC_FILE_RANGE_WAIT_BEFORE
public static final int SYNC_FILE_RANGE_WRITE
public static final int SYNC_FILE_RANGE_WAIT_AFTER
public static NativeIO.POSIX.CacheTracker cacheTracker
public static boolean isAvailable()
public static FileDescriptor open(String path, int flags, int mode) throws IOException
IOException
public static void chmod(String path, int mode) throws IOException
IOException
public static void posixFadviseIfPossible(String identifier, FileDescriptor fd, long offset, long len, int flags) throws NativeIOException
NativeIOException
- if there is an error with the syscallpublic static void syncFileRangeIfPossible(FileDescriptor fd, long offset, long nbytes, int flags) throws NativeIOException
NativeIOException
- if there is an error with the syscallpublic static NativeIO.POSIX.Stat getFstat(FileDescriptor fd) throws IOException
fd
- file descriptor.IOException
- thrown if there was an IO error while obtaining the file stat.Copyright © 2013 Apache Software Foundation. All rights reserved.