Package org.apache.cassandra.utils
Interface NativeLibraryWrapper
- All Known Implementing Classes:
NativeLibraryDarwin,NativeLibraryLinux
public interface NativeLibraryWrapper
An interface to implement for using OS specific native methods.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintcallClose(int fd) intcallFcntl(int fd, int command, long flags) intcallFsync(int fd) longintcallMlockall(int flags) intintintcallPosixFadvise(int fd, long offset, int len, int flag) com.sun.jna.PointercallStrerror(int errnum) booleanChecks if the library has been successfully linked.
-
Method Details
-
isAvailable
boolean isAvailable()Checks if the library has been successfully linked.- Returns:
trueif the library has been successfully linked,falseotherwise.
-
callMlockall
- Throws:
UnsatisfiedLinkErrorRuntimeException
-
callMunlockall
- Throws:
UnsatisfiedLinkErrorRuntimeException
-
callFcntl
- Throws:
UnsatisfiedLinkErrorRuntimeException
-
callPosixFadvise
int callPosixFadvise(int fd, long offset, int len, int flag) throws UnsatisfiedLinkError, RuntimeException - Throws:
UnsatisfiedLinkErrorRuntimeException
-
callOpen
- Throws:
UnsatisfiedLinkErrorRuntimeException
-
callFsync
- Throws:
UnsatisfiedLinkErrorRuntimeException
-
callClose
- Throws:
UnsatisfiedLinkErrorRuntimeException
-
callStrerror
- Throws:
UnsatisfiedLinkErrorRuntimeException
-
callGetpid
- Throws:
UnsatisfiedLinkErrorRuntimeException
-