Top Description Inners Fields Constructors Methods
org.jooq.impl

pack-priv final Class ThreadGuard

extends Object
Class Inheritance
Imports
java.util.function.Supplier

This API acts as a "guard" to prevent the same code from being executed recursively within the same thread.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static interface
ThreadGuard.GuardedOperation<V>

A guarded operation.

Field Summary

Modifier and TypeField and Description
pack-priv static final ThreadGuard.Guard

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static final void
run(ThreadGuard.Guard guard, Runnable unguardedOperation, Runnable guardedOperation)

Run an operation using a guard.

pack-priv static final <V> V
run(ThreadGuard.Guard guard, Supplier<V> unguardedOperation, Supplier<V> guardedOperation)

Run an operation using a guard.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

RECORD_TOSTRINGback to summary
pack-priv static final ThreadGuard.Guard RECORD_TOSTRING

Constructor Detail

ThreadGuardback to summary
pack-priv ThreadGuard()

Method Detail

runback to summary
pack-priv static final void run(ThreadGuard.Guard guard, Runnable unguardedOperation, Runnable guardedOperation)

Run an operation using a guard.

runback to summary
pack-priv static final <V> V run(ThreadGuard.Guard guard, Supplier<V> unguardedOperation, Supplier<V> guardedOperation)

Run an operation using a guard.

org.jooq.impl back to summary

pack-priv final Class ThreadGuard.Guard

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final ThreadLocal<Object>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

tlback to summary
pack-priv final ThreadLocal<Object> tl

Constructor Detail

Guardback to summary
pack-priv Guard()
org.jooq.impl back to summary

pack-priv Interface ThreadGuard.GuardedOperation<V>


A guarded operation.

Method Summary

Modifier and TypeMethod and Description
public V
guarded()

This callback is executed if unguarded() has already been executed on the current stack.

public V
unguarded()

This callback is executed only once on the current stack.

Method Detail

guardedback to summary
public V guarded()

This callback is executed if unguarded() has already been executed on the current stack.

unguardedback to summary
public V unguarded()

This callback is executed only once on the current stack.