public static class NativeIO.POSIX
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
NativeIO.POSIX.CacheManipulator |
Used to manipulate the operating system cache.
|
static class |
NativeIO.POSIX.NoMlockCacheManipulator |
A CacheManipulator used for testing which does not actually call mlock.
|
static class |
NativeIO.POSIX.Pmem |
JNI wrapper of persist memory operations.
|
static class |
NativeIO.POSIX.PmemMappedRegion |
Denote memory region for a file mapped.
|
static class |
NativeIO.POSIX.Stat |
Result type of the fstat call
|
static class |
NativeIO.POSIX.SupportState |
Keeps the support state of PMDK.
|
| Modifier and Type | Field | Description |
|---|---|---|
static boolean |
fadvisePossible |
|
static int |
MMAP_PROT_EXEC |
|
static int |
MMAP_PROT_READ |
|
static int |
MMAP_PROT_WRITE |
|
static int |
O_APPEND |
|
static int |
O_CREAT |
|
static int |
O_EXCL |
|
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 | Description |
|---|---|
POSIX() |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
chmod(java.lang.String path,
int mode) |
|
static NativeIO.POSIX.CacheManipulator |
getCacheManipulator() |
|
static NativeIO.POSIX.Stat |
getFstat(java.io.FileDescriptor fd) |
Returns the file stat for a file descriptor.
|
static java.lang.String |
getPmdkSupportStateMessage() |
|
static NativeIO.POSIX.Stat |
getStat(java.lang.String path) |
Return the file stat for a file path.
|
static boolean |
isAvailable() |
|
static boolean |
isPmdkAvailable() |
|
static long |
mmap(java.io.FileDescriptor fd,
int prot,
boolean shared,
long length) |
|
static void |
munmap(long addr,
long length) |
|
static void |
munmap(java.nio.MappedByteBuffer buffer) |
Unmaps the block from memory.
|
static java.io.FileDescriptor |
open(java.lang.String path,
int flags,
int mode) |
Wrapper around open(2) .
|
static void |
setCacheManipulator(NativeIO.POSIX.CacheManipulator cacheManipulator) |
|
static void |
setPmdkSupportState(int stateCode) |
|
static void |
syncFileRangeIfPossible(java.io.FileDescriptor fd,
long offset,
long nbytes,
int flags) |
Call sync_file_range on the given file descriptor.
|
public static int O_RDONLY
public static int O_WRONLY
public static int O_RDWR
public static int O_CREAT
public static int O_EXCL
public static int O_NOCTTY
public static int O_TRUNC
public static int O_APPEND
public static int O_NONBLOCK
public static int O_SYNC
public static int POSIX_FADV_NORMAL
public static int POSIX_FADV_RANDOM
public static int POSIX_FADV_SEQUENTIAL
public static int POSIX_FADV_WILLNEED
public static int POSIX_FADV_DONTNEED
public static int POSIX_FADV_NOREUSE
public static int SYNC_FILE_RANGE_WAIT_BEFORE
public static int SYNC_FILE_RANGE_WRITE
public static int SYNC_FILE_RANGE_WAIT_AFTER
public static boolean fadvisePossible
public static final int MMAP_PROT_READ
public static final int MMAP_PROT_WRITE
public static final int MMAP_PROT_EXEC
public static NativeIO.POSIX.CacheManipulator getCacheManipulator()
public static void setCacheManipulator(NativeIO.POSIX.CacheManipulator cacheManipulator)
public static void setPmdkSupportState(int stateCode)
public static java.lang.String getPmdkSupportStateMessage()
public static boolean isPmdkAvailable()
public static boolean isAvailable()
public static java.io.FileDescriptor open(java.lang.String path,
int flags,
int mode)
throws java.io.IOException
path - input path.flags - input flags.mode - input mode.java.io.IOException - raised on errors performing I/O.public static void chmod(java.lang.String path,
int mode)
throws java.io.IOException
java.io.IOExceptionpublic static void syncFileRangeIfPossible(java.io.FileDescriptor fd,
long offset,
long nbytes,
int flags)
throws NativeIOException
fd - input fd.offset - input offset.nbytes - input nbytes.flags - input flag.NativeIOException - if there is an error with the syscallpublic static void munmap(java.nio.MappedByteBuffer buffer)
buffer - The buffer to unmap.public static NativeIO.POSIX.Stat getFstat(java.io.FileDescriptor fd) throws java.io.IOException
fd - file descriptor.java.io.IOException - thrown if there was an IO error while obtaining the file stat.public static NativeIO.POSIX.Stat getStat(java.lang.String path) throws java.io.IOException
path - file pathjava.io.IOException - thrown if there is an IO error while obtaining the
file statpublic static long mmap(java.io.FileDescriptor fd,
int prot,
boolean shared,
long length)
throws java.io.IOException
java.io.IOExceptionpublic static void munmap(long addr,
long length)
throws java.io.IOException
java.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.