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:
NativeLibrary
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
isAvailable
boolean isAvailable()
Checks if the library has been successfully linked.- Returns:
true
if the library has been successfully linked,false
otherwise.
-
callMlockall
int callMlockall(int flags) throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException
- Throws:
java.lang.UnsatisfiedLinkError
java.lang.RuntimeException
-
callMunlockall
int callMunlockall() throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException
- Throws:
java.lang.UnsatisfiedLinkError
java.lang.RuntimeException
-
callFcntl
int callFcntl(int fd, int command, long flags) throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException
- Throws:
java.lang.UnsatisfiedLinkError
java.lang.RuntimeException
-
callPosixFadvise
int callPosixFadvise(int fd, long offset, int len, int flag) throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException
- Throws:
java.lang.UnsatisfiedLinkError
java.lang.RuntimeException
-
callOpen
int callOpen(java.lang.String path, int flags) throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException
- Throws:
java.lang.UnsatisfiedLinkError
java.lang.RuntimeException
-
callFsync
int callFsync(int fd) throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException
- Throws:
java.lang.UnsatisfiedLinkError
java.lang.RuntimeException
-
callClose
int callClose(int fd) throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException
- Throws:
java.lang.UnsatisfiedLinkError
java.lang.RuntimeException
-
callStrerror
com.sun.jna.Pointer callStrerror(int errnum) throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException
- Throws:
java.lang.UnsatisfiedLinkError
java.lang.RuntimeException
-
callGetpid
long callGetpid() throws java.lang.UnsatisfiedLinkError, java.lang.RuntimeException
- Throws:
java.lang.UnsatisfiedLinkError
java.lang.RuntimeException
-
-