public static class ReadWriteLockHelper.LockHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
<T,U,R,E extends java.lang.Exception> |
lock(CheckedBiFunction<T,U,R,E> operation,
T t,
U u)
Encapsulated the evaluation of the supplied
CheckedBiFunction within the boundaries of the lock. |
<T,E extends java.lang.Exception> |
lock(CheckedConsumer<T,E> operation,
T t)
Encapsulated the evaluation of the supplied
CheckedConsumer within the boundaries of the lock. |
<T,R,E extends java.lang.Exception> |
lock(CheckedFunction<T,R,E> operation,
T t)
Encapsulated the evaluation of the supplied
CheckedFunction within the boundaries of the lock. |
<E extends java.lang.Exception> |
lock(CheckedRunnable<E> operation)
Encapsulated the evaluation of the supplied
CheckedRunnable within the boundaries of the lock. |
<R,E extends java.lang.Exception> |
lock(CheckedSupplier<R,E> operation)
Encapsulated the evaluation of the supplied
CheckedSupplier within the boundaries of the lock. |
<T,U,R,E extends java.lang.Exception> |
tryLock(CheckedBiFunction<T,U,R,E> operation,
T t,
U u)
Tries to acquire the lock and if successful, evaluates the supplied
CheckedBiFunction within the boundaries of the lock. |
<T,E extends java.lang.Exception> |
tryLock(CheckedConsumer<T,E> operation,
T t)
Tries to acquire the lock and if successful, evaluates the supplied
CheckedConsumer within the boundaries of the lock. |
<T,R,E extends java.lang.Exception> |
tryLock(CheckedFunction<T,R,E> operation,
T t)
Tries to acquire the lock and if successful, evaluates the supplied
CheckedFunction within the boundaries of the lock. |
<E extends java.lang.Exception> |
tryLock(CheckedRunnable<E> operation)
Tries to acquire the lock and if successful, evaluates the supplied
CheckedRunnable within the boundaries of the lock. |
<R,E extends java.lang.Exception> |
tryLock(CheckedSupplier<R,E> operation)
Tries to acquire the lock and if successful, evaluates the supplied
CheckedSupplier within the boundaries of the lock. |
public <R,E extends java.lang.Exception> R lock(CheckedSupplier<R,E> operation) throws E extends java.lang.Exception
CheckedSupplier within the boundaries of the lock.R - the return type for the CheckedSupplier.E - the type of the exception thrown by the CheckedSupplier.operation - the CheckedSupplier to evaluate.CheckedSupplier.E - the exception thrown by the CheckedSupplier.E extends java.lang.Exceptionpublic <T,R,E extends java.lang.Exception> R lock(CheckedFunction<T,R,E> operation, T t) throws E extends java.lang.Exception
CheckedFunction within the boundaries of the lock.T - the type of he parameter to pass the CheckedFunctionR - the return type for the CheckedFunction.E - the type of the exception thrown by the CheckedFunction.operation - the CheckedFunction to apply.t - the parameter to pass the CheckedFunctionCheckedFunction.E - the exception thrown by the CheckedFunction.E extends java.lang.Exceptionpublic <T,U,R,E extends java.lang.Exception> R lock(CheckedBiFunction<T,U,R,E> operation, T t, U u) throws E extends java.lang.Exception
CheckedBiFunction within the boundaries of the lock.T - the type of the first parameter of the CheckedBiFunction.U - the type of the first parameter of the CheckedBiFunction.R - the return type for the CheckedBiFunction.E - the type of the exception thrown by the CheckedBiFunction.operation - the CheckedBiFunction to apply.t - the first parameter to pass the CheckedBiFunction.u - the second parameter to pass the CheckedBiFunction.CheckedFunction.E - the exception thrown by the CheckedBiFunction.E extends java.lang.Exceptionpublic <E extends java.lang.Exception> void lock(CheckedRunnable<E> operation) throws E extends java.lang.Exception
CheckedRunnable within the boundaries of the lock.E - the type of the exception thrown by the CheckedRunnable.operation - the CheckedRunnable to evaluate.E - the exception thrown by the CheckedRunnable.E extends java.lang.Exceptionpublic <T,E extends java.lang.Exception> void lock(CheckedConsumer<T,E> operation, T t) throws E extends java.lang.Exception
CheckedConsumer within the boundaries of the lock.T - the type of the parameter to pass the CheckedConsumerE - the type of the exception thrown by the CheckedConsumer.operation - the CheckedConsumer to evaluate.t - the parameter to pass the CheckedConsumerE - the exception thrown by the CheckedConsumer.E extends java.lang.Exceptionpublic <R,E extends java.lang.Exception> java.util.Optional<R> tryLock(CheckedSupplier<R,E> operation) throws E extends java.lang.Exception
CheckedSupplier within the boundaries of the lock.R - the return type for the CheckedSupplier.E - the type of the exception thrown by the CheckedSupplier.operation - the CheckedSupplier to evaluate.Optional that contains the return value of the CheckedSupplier if the lock could be acquiredE - the exception thrown by the CheckedSupplier.E extends java.lang.Exceptionpublic <T,R,E extends java.lang.Exception> java.util.Optional<R> tryLock(CheckedFunction<T,R,E> operation, T t) throws E extends java.lang.Exception
CheckedFunction within the boundaries of the lock.T - the type of he parameter to pass the CheckedFunctionR - the return type for the CheckedFunction.E - the type of the exception thrown by the CheckedFunction.operation - the CheckedFunction to apply.t - the parameter to pass the CheckedFunctionCheckedFunction.E - the exception thrown by the CheckedFunction.E extends java.lang.Exceptionpublic <T,U,R,E extends java.lang.Exception> java.util.Optional<R> tryLock(CheckedBiFunction<T,U,R,E> operation, T t, U u) throws E extends java.lang.Exception
CheckedBiFunction within the boundaries of the lock.T - the type of the first parameter of the CheckedBiFunction.U - the type of the first parameter of the CheckedBiFunction.R - the return type for the CheckedBiFunction.E - the type of the exception thrown by the CheckedBiFunction.operation - the CheckedBiFunction to apply.t - the first parameter to pass the CheckedBiFunction.u - the second parameter to pass the CheckedBiFunction.CheckedFunction.E - the exception thrown by the CheckedBiFunction.E extends java.lang.Exceptionpublic <E extends java.lang.Exception> boolean tryLock(CheckedRunnable<E> operation) throws E extends java.lang.Exception
CheckedRunnable within the boundaries of the lock.E - the type of the exception thrown by the CheckedRunnable.operation - the CheckedRunnable to evaluate.E - the exception thrown by the CheckedRunnable.E extends java.lang.Exceptionpublic <T,E extends java.lang.Exception> boolean tryLock(CheckedConsumer<T,E> operation, T t) throws E extends java.lang.Exception
CheckedConsumer within the boundaries of the lock.T - the type of the parameter to pass the CheckedConsumerE - the type of the exception thrown by the CheckedConsumer.operation - the CheckedConsumer to evaluate.t - the parameter to pass the CheckedConsumerE - the exception thrown by the CheckedConsumer.E extends java.lang.ExceptionCopyright © 2018 Frederic Thevenet. All rights reserved.