org.apache.cassandra.utils

## Class NativeLibraryWindows

- java.lang.Object
- - org.apache.cassandra.utils.NativeLibraryWindows

-     public class NativeLibraryWindows
      extends java.lang.Object

  A `NativeLibraryWrapper` implementation for Windows.

  This implementation only offers support for the `callGetpid` method using the Windows/Kernel32 library.

  See Also:
    `NativeLibraryWrapper`, `NativeLibrary`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NativeLibraryWindows()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NativeLibraryWindows

          public NativeLibraryWindows()

  - ### Method Detail

    - #### callMlockall

          public int callMlockall(int flags)
                           throws java.lang.UnsatisfiedLinkError,
                                  java.lang.RuntimeException

      Throws:
        `java.lang.UnsatisfiedLinkError`
        `java.lang.RuntimeException`

    - #### callMunlockall

          public int callMunlockall()
                             throws java.lang.UnsatisfiedLinkError,
                                    java.lang.RuntimeException

      Throws:
        `java.lang.UnsatisfiedLinkError`
        `java.lang.RuntimeException`

    - #### callFcntl

          public int callFcntl(int fd,
                               int command,
                               long flags)
                        throws java.lang.UnsatisfiedLinkError,
                               java.lang.RuntimeException

      Throws:
        `java.lang.UnsatisfiedLinkError`
        `java.lang.RuntimeException`

    - #### callPosixFadvise

          public 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

          public int callOpen(java.lang.String path,
                              int flags)
                       throws java.lang.UnsatisfiedLinkError,
                              java.lang.RuntimeException

      Throws:
        `java.lang.UnsatisfiedLinkError`
        `java.lang.RuntimeException`

    - #### callFsync

          public int callFsync(int fd)
                        throws java.lang.UnsatisfiedLinkError,
                               java.lang.RuntimeException

      Throws:
        `java.lang.UnsatisfiedLinkError`
        `java.lang.RuntimeException`

    - #### callClose

          public int callClose(int fd)
                        throws java.lang.UnsatisfiedLinkError,
                               java.lang.RuntimeException

      Throws:
        `java.lang.UnsatisfiedLinkError`
        `java.lang.RuntimeException`

    - #### callStrerror

          public com.sun.jna.Pointer callStrerror(int errnum)
                                           throws java.lang.UnsatisfiedLinkError,
                                                  java.lang.RuntimeException

      Throws:
        `java.lang.UnsatisfiedLinkError`
        `java.lang.RuntimeException`

    - #### callGetpid

          public long callGetpid()
                          throws java.lang.UnsatisfiedLinkError,
                                 java.lang.RuntimeException

      Returns:
        the PID of the JVM running
      Throws:
        `java.lang.UnsatisfiedLinkError` - if we fail to link against Sigar
        `java.lang.RuntimeException` - if another unexpected error is thrown by Sigar

    - #### isAvailable

          public boolean isAvailable()

      Checks if the library has been successfully linked.
      Returns:
        `true` if the library has been successfully linked, `false` otherwise.

Copyright © 2018 The Apache Software Foundation