public class NativeLibraryWindows
extends java.lang.Object
NativeLibraryWrapper implementation for Windows.
This implementation only offers support for the callGetpid method
using the Windows/Kernel32 library.
NativeLibraryWrapper,
NativeLibrary| Constructor and Description |
|---|
NativeLibraryWindows() |
| Modifier and Type | Method and Description |
|---|---|
int |
callClose(int fd) |
int |
callFcntl(int fd,
int command,
long flags) |
int |
callFsync(int fd) |
long |
callGetpid() |
int |
callMlockall(int flags) |
int |
callMunlockall() |
int |
callOpen(java.lang.String path,
int flags) |
int |
callPosixFadvise(int fd,
long offset,
int len,
int flag) |
com.sun.jna.Pointer |
callStrerror(int errnum) |
boolean |
isAvailable()
Checks if the library has been successfully linked.
|
public int callMlockall(int flags)
throws java.lang.UnsatisfiedLinkError,
java.lang.RuntimeException
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeExceptionpublic int callMunlockall()
throws java.lang.UnsatisfiedLinkError,
java.lang.RuntimeException
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeExceptionpublic int callFcntl(int fd,
int command,
long flags)
throws java.lang.UnsatisfiedLinkError,
java.lang.RuntimeException
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeExceptionpublic int callPosixFadvise(int fd,
long offset,
int len,
int flag)
throws java.lang.UnsatisfiedLinkError,
java.lang.RuntimeException
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeExceptionpublic int callOpen(java.lang.String path,
int flags)
throws java.lang.UnsatisfiedLinkError,
java.lang.RuntimeException
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeExceptionpublic int callFsync(int fd)
throws java.lang.UnsatisfiedLinkError,
java.lang.RuntimeException
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeExceptionpublic int callClose(int fd)
throws java.lang.UnsatisfiedLinkError,
java.lang.RuntimeException
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeExceptionpublic com.sun.jna.Pointer callStrerror(int errnum)
throws java.lang.UnsatisfiedLinkError,
java.lang.RuntimeException
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeExceptionpublic long callGetpid()
throws java.lang.UnsatisfiedLinkError,
java.lang.RuntimeException
java.lang.UnsatisfiedLinkError - if we fail to link against Sigarjava.lang.RuntimeException - if another unexpected error is thrown by Sigarpublic boolean isAvailable()
true if the library has been successfully linked, false otherwise.Copyright © 2018 The Apache Software Foundation