Package net.bytebuddy.agent
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
VirtualMachine.ForOpenJ9.Dispatcher.ForJnaWindowsEnvironment.WindowsLibrary.SecurityAttributes
A structure representing a mutex's security attributes.
-
Field Summary
Fields Modifier and Type Field Description static int
SEMAPHORE_ALL_ACCESS
Indicates that a semaphore requires all access rights.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.sun.jna.platform.win32.WinNT.HANDLE
CreateMutex(VirtualMachine.ForOpenJ9.Dispatcher.ForJnaWindowsEnvironment.WindowsLibrary.SecurityAttributes attributes, boolean owner, java.lang.String name)
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, java.lang.String name)
Creates a new semaphore.com.sun.jna.platform.win32.WinNT.HANDLE
OpenMutex(int access, boolean inherit, java.lang.String name)
Opens an existing object.com.sun.jna.platform.win32.WinNT.HANDLE
OpenSemaphoreW(int access, boolean inheritHandle, java.lang.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, java.lang.Long previousCount)
Releases the semaphore.
-
-
-
Field Detail
-
SEMAPHORE_ALL_ACCESS
static final int SEMAPHORE_ALL_ACCESS
Indicates that a semaphore requires all access rights.- See Also:
- Constant Field Values
-
-
Method Detail
-
OpenSemaphoreW
@MaybeNull com.sun.jna.platform.win32.WinNT.HANDLE OpenSemaphoreW(int access, boolean inheritHandle, java.lang.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, java.lang.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 java.lang.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 ornull
.- 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, java.lang.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, java.lang.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.
-
-