Interface VirtualMachine.ForOpenJ9.Dispatcher.ForJnaWindowsEnvironment.WindowsLibrary

All Superinterfaces:
com.sun.jna.AltCallingConvention, com.sun.jna.Library, com.sun.jna.win32.StdCall, com.sun.jna.win32.StdCallLibrary
Enclosing class:
VirtualMachine.ForOpenJ9.Dispatcher.ForJnaWindowsEnvironment

protected static interface VirtualMachine.ForOpenJ9.Dispatcher.ForJnaWindowsEnvironment.WindowsLibrary extends com.sun.jna.win32.StdCallLibrary
A library for interacting with Windows.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    A structure representing a mutex's security attributes.

    Nested classes/interfaces inherited from interface com.sun.jna.Library

    com.sun.jna.Library.Handler

    Nested classes/interfaces inherited from interface com.sun.jna.win32.StdCallLibrary

    com.sun.jna.win32.StdCallLibrary.StdCallCallback
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Indicates that a semaphore requires all access rights.

    Fields inherited from interface com.sun.jna.Library

    OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_SYMBOL_PROVIDER, OPTION_TYPE_MAPPER

    Fields inherited from interface com.sun.jna.win32.StdCallLibrary

    FUNCTION_MAPPER, STDCALL_CONVENTION
  • Method Summary

    Modifier and Type
    Method
    Description
    com.sun.jna.platform.win32.WinNT.HANDLE
    Create or opens a mutex.
    com.sun.jna.platform.win32.WinNT.HANDLE
    CreateSemaphoreW(com.sun.jna.platform.win32.WinBase.SECURITY_ATTRIBUTES securityAttributes, long count, long maximumCount, String name)
    Creates a new semaphore.
    com.sun.jna.platform.win32.WinNT.HANDLE
    OpenMutex(int access, boolean inherit, String name)
    Opens an existing object.
    com.sun.jna.platform.win32.WinNT.HANDLE
    OpenSemaphoreW(int access, boolean inheritHandle, String name)
    Opens an existing semaphore.
    boolean
    ReleaseMutex(com.sun.jna.platform.win32.WinNT.HANDLE handle)
    Releases the supplied mutex.
    boolean
    ReleaseSemaphore(com.sun.jna.platform.win32.WinNT.HANDLE handle, long count, Long previousCount)
    Releases the semaphore.
  • Field Details

    • SEMAPHORE_ALL_ACCESS

      static final int SEMAPHORE_ALL_ACCESS
      Indicates that a semaphore requires all access rights.
      See Also:
  • Method Details

    • OpenSemaphoreW

      @MaybeNull com.sun.jna.platform.win32.WinNT.HANDLE OpenSemaphoreW(int access, boolean inheritHandle, String name)
      Opens an existing semaphore.
      Parameters:
      access - The access rights.
      inheritHandle - true if the handle is inherited.
      name - The semaphore's name.
      Returns:
      The handle or null if the handle could not be created.
    • CreateSemaphoreW

      @MaybeNull com.sun.jna.platform.win32.WinNT.HANDLE CreateSemaphoreW(@MaybeNull com.sun.jna.platform.win32.WinBase.SECURITY_ATTRIBUTES securityAttributes, long count, long maximumCount, String name)
      Creates a new semaphore.
      Parameters:
      securityAttributes - The security attributes for the created semaphore.
      count - The initial count for the semaphore.
      maximumCount - The maximum count for the semaphore.
      name - The semaphore's name.
      Returns:
      The handle or null if the handle could not be created.
    • ReleaseSemaphore

      boolean ReleaseSemaphore(com.sun.jna.platform.win32.WinNT.HANDLE handle, long count, @MaybeNull Long previousCount)
      Releases the semaphore.
      Parameters:
      handle - The semaphore's handle.
      count - The amount with which to increase the semaphore.
      previousCount - The previous count of the semaphore or null.
      Returns:
      true if the semaphore was successfully released.
    • CreateMutex

      @MaybeNull com.sun.jna.platform.win32.WinNT.HANDLE CreateMutex(VirtualMachine.ForOpenJ9.Dispatcher.ForJnaWindowsEnvironment.WindowsLibrary.SecurityAttributes attributes, boolean owner, String name)
      Create or opens a mutex.
      Parameters:
      attributes - The mutex's security attributes.
      owner - true if the caller is supposed to be the initial owner.
      name - The mutex name.
      Returns:
      The handle to the mutex or null if the mutex could not be created.
    • OpenMutex

      com.sun.jna.platform.win32.WinNT.HANDLE OpenMutex(int access, boolean inherit, String name)
      Opens an existing object.
      Parameters:
      access - The required access privileges.
      inherit - true if the mutex should be inherited.
      name - The mutex's name.
      Returns:
      The handle or null if the mutex could not be opened.
    • ReleaseMutex

      boolean ReleaseMutex(com.sun.jna.platform.win32.WinNT.HANDLE handle)
      Releases the supplied mutex.
      Parameters:
      handle - The handle to the mutex.
      Returns:
      true if the handle was successfully released.