
public class ONative extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ONative.MemoryLimitResult |
| Modifier and Type | Field and Description |
|---|---|
static int |
MCL_CURRENT |
static int |
MCL_FUTURE |
static int |
O_APPEND |
static int |
O_CREAT |
static int |
O_DIRECT |
static int |
O_EXCL |
static int |
O_RDONLY |
static int |
O_RDWR |
static int |
O_SYNC |
static int |
O_TRUNC |
static int |
O_WRONLY |
static int |
SEEK_CUR |
static int |
SEEK_END |
static int |
SEEK_SET |
| Modifier and Type | Method and Description |
|---|---|
void |
close(int fd) |
void |
fallocate(int fd,
long offset,
long len) |
void |
fsync(int fd) |
ONative.MemoryLimitResult |
getMemoryLimit(boolean printSteps) |
int |
getOpenFilesLimit(boolean verbose,
int recommended,
int defLimit)
Detects limit of limit of open files.
|
int |
getpagesize() |
static ONative |
instance() |
long |
lseek(int fd,
long offset,
int whence) |
int |
open(String path,
int flags) |
int |
pathconf(String path,
int name) |
void |
posix_memalign(jnr.ffi.byref.PointerByReference memptr,
jnr.ffi.NativeLong alignment,
jnr.ffi.NativeLong size) |
long |
read(int fd,
ByteBuffer buffer,
int count) |
long |
write(int fd,
ByteBuffer buffer,
int count) |
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_APPEND
public static final int O_TRUNC
public static final int O_DIRECT
public static final int O_SYNC
public static final int SEEK_SET
public static final int SEEK_CUR
public static final int SEEK_END
public static final int MCL_CURRENT
public static final int MCL_FUTURE
public static ONative instance()
public int getOpenFilesLimit(boolean verbose,
int recommended,
int defLimit)
recommended - recommended value of limit of open files.defLimit - default value for limit of open files.public ONative.MemoryLimitResult getMemoryLimit(boolean printSteps)
printSteps - Print all steps of discovering of memory limit in the log with INFO
level.null is returned then it was
impossible to detect amount of memory on machine.public int open(String path, int flags) throws LastErrorException
LastErrorExceptionpublic void fallocate(int fd,
long offset,
long len)
throws LastErrorException
LastErrorExceptionpublic long read(int fd,
ByteBuffer buffer,
int count)
throws LastErrorException
LastErrorExceptionpublic long write(int fd,
ByteBuffer buffer,
int count)
throws LastErrorException
LastErrorExceptionpublic void posix_memalign(jnr.ffi.byref.PointerByReference memptr,
jnr.ffi.NativeLong alignment,
jnr.ffi.NativeLong size)
throws LastErrorException
LastErrorExceptionpublic int getpagesize()
throws LastErrorException
LastErrorExceptionpublic int pathconf(String path, int name) throws LastErrorException
LastErrorExceptionpublic void fsync(int fd)
throws IOException
IOExceptionpublic long lseek(int fd,
long offset,
int whence)
throws LastErrorException
LastErrorExceptionpublic void close(int fd)
throws LastErrorException
LastErrorExceptionCopyright © 2009–2025 OrientDB. All rights reserved.