Top Description Methods
org.wildfly.common.lock

public Interface ExtendedLock

extends Lock
Known Direct Implementers
org.wildfly.common.lock.ExtendedReentrantLock, org.wildfly.common.lock.SpinLock
Imports
java.util.concurrent.locks.Lock

A thread-owned lock which exposes additional informational methods.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the lock instance tends towards fairness, false otherwise
isFair
()

Query if this lock instance tends to be "fair".

public boolean

Returns:

true if this lock is held by the current thread, false otherwise
isHeldByCurrentThread
()

Determine if this lock is held by the current thread.

public boolean

Returns:

true if this lock is held, false otherwise
isLocked
()

Determine if this lock is held.

Inherited from java.util.concurrent.locks.Lock:
locklockInterruptiblynewConditiontryLocktryLockunlock

Method Detail

isFairback to summary
public boolean isFair()

Query if this lock instance tends to be "fair".

Returns:boolean

true if the lock instance tends towards fairness, false otherwise

isHeldByCurrentThreadback to summary
public boolean isHeldByCurrentThread()

Determine if this lock is held by the current thread.

Returns:boolean

true if this lock is held by the current thread, false otherwise

isLockedback to summary
public boolean isLocked()

Determine if this lock is held.

Returns:boolean

true if this lock is held, false otherwise