Top Description Constructors Methods
org.wildfly.common.lock

public final Class Locks

extends Object
Class Inheritance
Imports
org.wildfly.common.annotation.NotNull

A utility class to create ExtendedLock objects.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ExtendedLock

Returns:

a reentrant ExtendedLock
reentrantLock
()

Create a standard reentrant ExtendedLock with the default fairness policy.

public static ExtendedLock

Returns:

a reentrant ExtendedLock
reentrantLock
(boolean
the fairness policy
fair
)

Create a standard reentrant ExtendedLock with the given fairness policy.

public static ExtendedLock

Returns:

the spin lock
spinLock
()

Create a spin lock.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Locksback to summary
private Locks()

Method Detail

reentrantLockback to summary
public static ExtendedLock reentrantLock()

Create a standard reentrant ExtendedLock with the default fairness policy.

Returns:ExtendedLock

a reentrant ExtendedLock

Annotations
@NotNull
reentrantLockback to summary
public static ExtendedLock reentrantLock(boolean fair)

Create a standard reentrant ExtendedLock with the given fairness policy.

Parameters
fair:boolean

the fairness policy

Returns:ExtendedLock

a reentrant ExtendedLock

Annotations
@NotNull
spinLockback to summary
public static ExtendedLock spinLock()

Create a spin lock.

Returns:ExtendedLock

the spin lock

Annotations
@NotNull
See Also
SpinLock