Package org.apache.cassandra.utils
Interface NativeLibraryWrapper
-
- All Known Implementing Classes:
NativeLibraryDarwin,NativeLibraryLinux
public interface NativeLibraryWrapperAn interface to implement for using OS specific native methods.- See Also:
NativeLibrary
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcallClose(int fd)intcallFcntl(int fd, int command, long flags)intcallFsync(int fd)longcallGetpid()intcallMlockall(int flags)intcallMunlockall()intcallOpen(java.lang.String path, int flags)intcallPosixFadvise(int fd, long offset, int len, int flag)com.sun.jna.PointercallStrerror(int errnum)booleanisAvailable()Checks if the library has been successfully linked.
-
-
-
Method Detail
-
isAvailable
boolean isAvailable()
Checks if the library has been successfully linked.- Returns:
trueif the library has been successfully linked,falseotherwise.
-
callMlockall
int callMlockall(int flags) throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException- Throws:
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeException
-
callMunlockall
int callMunlockall() throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException- Throws:
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeException
-
callFcntl
int callFcntl(int fd, int command, long flags) throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException- Throws:
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeException
-
callPosixFadvise
int callPosixFadvise(int fd, long offset, int len, int flag) throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException- Throws:
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeException
-
callOpen
int callOpen(java.lang.String path, int flags) throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException- Throws:
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeException
-
callFsync
int callFsync(int fd) throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException- Throws:
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeException
-
callClose
int callClose(int fd) throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException- Throws:
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeException
-
callStrerror
com.sun.jna.Pointer callStrerror(int errnum) throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException- Throws:
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeException
-
callGetpid
long callGetpid() throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException- Throws:
java.lang.UnsatisfiedLinkErrorjava.lang.RuntimeException
-
-