Top Inners Fields Constructors Methods
org.junit.platform.engine.support.hierarchical

pack-priv Class SingleLock

extends Object
implements ResourceLock
Class Inheritance
All Implemented Interfaces
org.junit.platform.engine.support.hierarchical.ResourceLock, java.lang.AutoCloseable
Static Imports
org.junit.platform.commons.util.CollectionUtils.getOnlyElement

Since
1.3

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final Lock
private final List<ExclusiveResource>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ResourceLock
acquire()

Implements org.junit.platform.engine.support.hierarchical.ResourceLock.acquire.

Acquire this resource lock, potentially blocking.

pack-priv Lock
public List<ExclusiveResource>
getResources()

Implements org.junit.platform.engine.support.hierarchical.ResourceLock.getResources.

Returns the exclusive resources this lock represents.

public boolean
isExclusive()

Implements org.junit.platform.engine.support.hierarchical.ResourceLock.isExclusive.

Returns whether this lock requires exclusiveness.

public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

lockback to summary
private final Lock lock
resourcesback to summary
private final List<ExclusiveResource> resources

Constructor Detail

SingleLockback to summary
pack-priv SingleLock(ExclusiveResource resource, Lock lock)

Method Detail

acquireback to summary
public ResourceLock acquire() throws InterruptedException

Implements org.junit.platform.engine.support.hierarchical.ResourceLock.acquire.

Doc from org.junit.platform.engine.support.hierarchical.ResourceLock.acquire.

Acquire this resource lock, potentially blocking.

Annotations
@Override
Exceptions
InterruptedException:
if the calling thread is interrupted while waiting to acquire this lock
getLockback to summary
pack-priv Lock getLock()
getResourcesback to summary
public List<ExclusiveResource> getResources()

Implements org.junit.platform.engine.support.hierarchical.ResourceLock.getResources.

Doc from org.junit.platform.engine.support.hierarchical.ResourceLock.getResources.

Returns the exclusive resources this lock represents.

Annotations
@Override
isExclusiveback to summary
public boolean isExclusive()

Implements org.junit.platform.engine.support.hierarchical.ResourceLock.isExclusive.

Doc from org.junit.platform.engine.support.hierarchical.ResourceLock.isExclusive.

Returns whether this lock requires exclusiveness.

Annotations
@Override
releaseback to summary
public void release()

Implements org.junit.platform.engine.support.hierarchical.ResourceLock.release.

Doc from org.junit.platform.engine.support.hierarchical.ResourceLock.release.

Release this resource lock.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
org.junit.platform.engine.support.hierarchical back to summary

private Class SingleLock.SingleLockManagedBlocker

extends Object
implements ManagedBlocker
Class Inheritance
  • java.lang.Object
  • org.junit.platform.engine.support.hierarchical.SingleLock.SingleLockManagedBlocker
All Implemented Interfaces
java.util.concurrent.ForkJoinPool.ManagedBlocker

Field Summary

Modifier and TypeField and Description
private volatile boolean

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
block()

Implements java.util.concurrent.ForkJoinPool.ManagedBlocker.block.

Possibly blocks the current thread, for example waiting for a lock or condition.

public boolean
isReleasable()

Implements java.util.concurrent.ForkJoinPool.ManagedBlocker.isReleasable.

Returns true if blocking is unnecessary.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

acquiredback to summary
private volatile boolean acquired

Constructor Detail

SingleLockManagedBlockerback to summary
private SingleLockManagedBlocker()

Method Detail

blockback to summary
public boolean block() throws InterruptedException

Implements java.util.concurrent.ForkJoinPool.ManagedBlocker.block.

Doc from java.util.concurrent.ForkJoinPool.ManagedBlocker.block.

Possibly blocks the current thread, for example waiting for a lock or condition.

Annotations
@Override
Exceptions
InterruptedException:
if interrupted while waiting (the method is not required to do so, but is allowed to)
isReleasableback to summary
public boolean isReleasable()

Implements java.util.concurrent.ForkJoinPool.ManagedBlocker.isReleasable.

Doc from java.util.concurrent.ForkJoinPool.ManagedBlocker.isReleasable.

Returns true if blocking is unnecessary.

Annotations
@Override