Class NativeLibraryLinux

java.lang.Object
org.apache.cassandra.utils.NativeLibraryLinux
All Implemented Interfaces:
NativeLibraryWrapper

public class NativeLibraryLinux extends Object implements NativeLibraryWrapper
A NativeLibraryWrapper implementation for Linux.

When JNA is initialized, all methods that have the 'native' keyword will be attmpted to be linked against. As Java doesn't have the equivalent of a #ifdef, this means if a native method like posix_fadvise is defined in the class but not available on the target operating system (e.g. posix_fadvise is not availble on Darwin/Mac) this will cause the entire initial linking and initialization of JNA to fail. This means other native calls that are supported on that target operating system will be unavailable simply because of one native defined method not supported on the runtime operating system.

See Also: