Index
All Classes and Interfaces|All Packages|Serialized Form
A
- addCancellationListener(Runnable) - Method in interface org.jtrim2.cancel.CancellationToken
-
Adds a listener which is to be called when cancellation was requested.
- allTokens(CancellationToken...) - Static method in class org.jtrim2.cancel.Cancellation
-
Returns a
CancellationTokenwhich signals cancellation if and only if all of the specified tokens are in canceled state. - anyToken(CancellationToken...) - Static method in class org.jtrim2.cancel.Cancellation
-
Returns a
CancellationTokenwhich signals cancellation if and only if at least one of the specified tokens are in canceled state. - AsyncFunction<R> - Interface in org.jtrim2.concurrent
-
Represents an asynchronous computation.
- AsyncTasks - Class in org.jtrim2.concurrent
-
Defines utility methods to help with asynchronous tasks relying on
CompletableFutureorCompletionStage. - await() - Method in interface org.jtrim2.cancel.InterruptibleWait
-
Waits until the implementation defined event occurs.
- await(long) - Method in interface org.jtrim2.cancel.InterruptibleLimitedWait
-
Waits until the implementation defined event occurs or the given timeout elapses.
- await(CancellationToken, long, TimeUnit, Condition) - Static method in class org.jtrim2.cancel.CancelableWaits
-
Calls
condition.await(long, TimeUnit)with the specified timeout value and waits until it returns or the specifiedCancellationTokensignals that the waiting must be canceled. - await(CancellationToken, long, TimeUnit, InterruptibleLimitedWait) - Static method in class org.jtrim2.cancel.CancelableWaits
-
Calls
wait.awaitwith the specified timeout value and waits until it returns or the specifiedCancellationTokensignals that the waiting must be canceled. - await(CancellationToken, Condition) - Static method in class org.jtrim2.cancel.CancelableWaits
-
Calls
condition.await()and waits until it returns or the specifiedCancellationTokensignals that the waiting must be canceled. - await(CancellationToken, InterruptibleWait) - Static method in class org.jtrim2.cancel.CancelableWaits
-
Waits until
wait.awaitreturns or the specifiedCancellationTokensignals that the waiting must be canceled. - awaitTerminate(CancellationToken, long, TimeUnit, ExecutorService) - Static method in class org.jtrim2.cancel.CancelableWaits
-
Calls
executor.awaitTermination(long, TimeUnit)with the specified timeout value and waits until it returns or the specifiedCancellationTokensignals that the waiting must be canceled.
C
- cancel() - Method in interface org.jtrim2.cancel.CancellationController
-
Requests that the associated task be canceled.
- CancelableWaits - Class in org.jtrim2.cancel
-
Defines static helper methods to wait for a cancellation request instead of thread interruption.
- CANCELED_TOKEN - Static variable in class org.jtrim2.cancel.Cancellation
-
A
CancellationTokenwhich is already in the canceled state. - Cancellation - Class in org.jtrim2.cancel
-
Contains static helper methods and fields related cancellation.
- CancellationController - Interface in org.jtrim2.cancel
-
Defines an interface to cancel an asynchronously executing task.
- CancellationSource - Interface in org.jtrim2.cancel
-
Defines an interface for linked
CancellationControllerandCancellationTokenobjects. - CancellationToken - Interface in org.jtrim2.cancel
-
Defines an interface to detect cancellation requests.
- checkCanceled() - Method in interface org.jtrim2.cancel.CancellationToken
-
Checks if cancellation has been requested and throws a
OperationCanceledExceptionif so otherwise returns immediately without doing anything. - clear() - Method in interface org.jtrim2.concurrent.collections.TerminableQueue
-
Removes all the elements from this queue.
- combineListenerRefs(Collection<? extends ListenerRef>) - Static method in class org.jtrim2.event.ListenerRefs
-
Returns a combination of multiple
ListenerRefinstances. - combineListenerRefs(ListenerRef...) - Static method in class org.jtrim2.event.ListenerRefs
-
Returns a combination of multiple
ListenerRefinstances. - complete(V, Throwable, CompletableFuture<? super V>) - Static method in class org.jtrim2.concurrent.AsyncTasks
-
Completes the passed future exceptionally or normally.
- completeForwarder(CompletableFuture<? super V>) - Static method in class org.jtrim2.concurrent.AsyncTasks
-
Returns a
BiConsumerpassable to thewhenCompletemethod ofCompletionStagecompleting the passedCompletableFuture. - CopyOnTriggerListenerManager<ListenerType> - Class in org.jtrim2.event
-
An
ListenerManagerimplementation which creates a copy of the currently registered listeners when dispatching events. - CopyOnTriggerListenerManager() - Constructor for class org.jtrim2.event.CopyOnTriggerListenerManager
-
Creates a new
CopyOnTriggerListenerManagerwith no listeners registered. - CountDownEvent - Class in org.jtrim2.event
-
Defines event which triggers after a counter reaches zero.
- CountDownEvent(int, Runnable) - Constructor for class org.jtrim2.event.CountDownEvent
-
Creates a new
CountDownEventwith the given initial counter value and event handler. - createCancellationSource() - Static method in class org.jtrim2.cancel.Cancellation
-
Creates a new
CancellationSourcewhoseCancellationTokenis not yet in the canceled state. - createChildCancellationSource(CancellationToken) - Static method in class org.jtrim2.cancel.Cancellation
-
Creates a new
CancellationSourcewhich will be notified of the cancellation requests of the specifiedCancellationToken.
D
- dec() - Method in class org.jtrim2.event.CountDownEvent
-
Decrements the counter by 1.
- dispatchRunnable(ListenerManager<? extends Runnable>) - Static method in class org.jtrim2.event.EventListeners
-
Calls the
onEventmethod of the passedListenerManager, causing therun()method of the registered listeners to be called. - dispatchRunnable(OneShotListenerManager<? extends Runnable, Void>) - Static method in class org.jtrim2.event.EventListeners
-
Calls the
onEventmethod of the passedOneShotListenerManager, causing therun()method of the registered listeners to be called. - DO_NOTHING_CONTROLLER - Static variable in class org.jtrim2.cancel.Cancellation
-
A
CancellationControllerwhich does nothing when callingcancel. - doAsCancelable(CancellationToken, InterruptibleTask<ResultType>) - Static method in class org.jtrim2.cancel.Cancellation
-
Executes the specified task on the current thread synchronously and interrupts the current thread if the specified
CancellationTokensignals a cancellation request.
E
- errorResultHandler(Consumer<? super Throwable>) - Static method in class org.jtrim2.concurrent.AsyncTasks
-
Returns a
BiConsumernotifying the passed error handler if any of the arguments of the returnedBiConsumeris notnull. - EventDispatcher<EventListenerType,
ArgType> - Interface in org.jtrim2.event -
Defines an interface to invoke specific kinds of event handlers.
- EventListeners - Class in org.jtrim2.event
-
Contains static utility methods for listener dispatching.
- execute() - Method in class org.jtrim2.concurrent.RepeatingTask
-
Submits this task to be executed a single time as soon as possible by the
ScheduledExecutorServicespecified at construction time. - execute(CancellationToken) - Method in interface org.jtrim2.cancel.InterruptibleTask
-
Executes the task defined by this
InterruptibleTask. - executeAsync(CancellationToken) - Method in interface org.jtrim2.concurrent.AsyncFunction
-
Starts executing the task asynchronously and returns a
CompletionStagenotified after the computation completes (normally or exceptionally). - expectNoError(Throwable) - Static method in class org.jtrim2.concurrent.AsyncTasks
-
Logs the argument as a
SEVERElevel issue, if it is notnulland does not represent cancellation.
G
- getController() - Method in interface org.jtrim2.cancel.CancellationSource
-
Returns the
CancellationControllerwhich can be used to signal cancellation to theCancellationTokenreturned by thegetToken()method. - getCounter() - Method in class org.jtrim2.event.CountDownEvent
-
Returns the current value of the counter.
- getListenerCount() - Method in class org.jtrim2.event.CopyOnTriggerListenerManager
- getListenerCount() - Method in interface org.jtrim2.event.ListenerRegistry
- getListenerCount() - Method in class org.jtrim2.event.OneShotListenerManager
- getToken() - Method in interface org.jtrim2.cancel.CancellationSource
-
Returns the
CancellationTokenwhich detects cancellation requests made through theCancellationControllerreturned by thegetController()method.
H
- handleErrorResult(Throwable, Throwable, Consumer<? super Throwable>) - Static method in class org.jtrim2.concurrent.AsyncTasks
-
Calls the given error handler if any of the exception arguments is not
null.
I
- inc() - Method in class org.jtrim2.event.CountDownEvent
-
Increments the counter by 1.
- init(ListenerRef) - Method in class org.jtrim2.event.InitLaterListenerRef
-
Sets to
ListenerRefto which calls are forwarded to. - InitLaterListenerRef - Class in org.jtrim2.event
-
Defines a
ListenerRefforwarding its calls to anotherListenerRefwhich is specified after construction time. - InitLaterListenerRef() - Constructor for class org.jtrim2.event.InitLaterListenerRef
-
Creates a new
InitLaterListenerRefwith no underlyingListenerRef. - InterruptibleLimitedWait - Interface in org.jtrim2.cancel
-
Defines a generic interface to wait for an event to occur or return before the given timeout elapses.
- InterruptibleTask<ResultType> - Interface in org.jtrim2.cancel
-
Defines a generic task which can be canceled by interrupting the thread executing the task.
- InterruptibleWait - Interface in org.jtrim2.cancel
-
Defines a generic interface to wait for an event to occur.
- isCanceled() - Method in interface org.jtrim2.cancel.CancellationToken
-
Returns
trueif cancellation was requested. - isCanceled(Throwable) - Static method in class org.jtrim2.concurrent.AsyncTasks
-
Returns
trueif the given exception represents a cancellation event. - isError(Throwable) - Static method in class org.jtrim2.concurrent.AsyncTasks
-
Returns
trueif the given exception represents an error event. - isSignaled() - Method in class org.jtrim2.concurrent.WaitableSignal
L
- ListenerManager<ListenerType> - Interface in org.jtrim2.event
-
Defines a
ListenerRegistrywhich allows events to be dispatched to registered listeners directly. - ListenerRef - Interface in org.jtrim2.event
-
Defines a reference of an event handler which has been registered to be notified of a certain event.
- ListenerRefs - Class in org.jtrim2.event
-
Defines static utility methods for
listener registries. - ListenerRegistry<ListenerType> - Interface in org.jtrim2.event
-
Defines a collection of event listeners which can be notified of events in an implementation dependent way.
- listenForCancellation(CancellationToken, Runnable) - Static method in class org.jtrim2.cancel.Cancellation
-
Adds a
cancellation listenerto the specifiedCancellationTokenand returns reference which can be used to remove the listener and wait until it has been removed. - lock(CancellationToken, Lock) - Static method in class org.jtrim2.cancel.CancelableWaits
-
Calls
lock.lockInterruptibly()and waits until it returns or the specifiedCancellationTokensignals that the waiting must be canceled.
N
- noOpConsumer() - Static method in class org.jtrim2.concurrent.Tasks
-
Returns a
Consumerwhoseapplymethod does nothing but returns immediately to the caller. - noOpTask() - Static method in class org.jtrim2.concurrent.Tasks
-
Returns a
Runnablewhoserun()method does nothing but returns immediately to the caller.
O
- offer(T) - Method in interface org.jtrim2.concurrent.collections.TerminableQueue
-
Adds an element to this queue if possible, or returns
falseif the queue does not accept the new element this time. - OneShotListenerManager<ListenerType,
ArgType> - Class in org.jtrim2.event -
A
ListenerRegistryimplementation which will automatically unregister listeners once they have been notified by anonEventcall. - OneShotListenerManager() - Constructor for class org.jtrim2.event.OneShotListenerManager
-
Creates a new
OneShotListenerManagerwith no listeners registered. - onEvent(EventListenerType, ArgType) - Method in interface org.jtrim2.event.EventDispatcher
-
Invokes the event handler method of the specified listener with the appropriate arguments.
- onEvent(EventDispatcher<? super ListenerType, ? super ArgType>, ArgType) - Method in class org.jtrim2.event.CopyOnTriggerListenerManager
-
Invokes the
onEventmethod of the specifiedEventDispatcherwith the currently registered listeners and the argument specified. - onEvent(EventDispatcher<? super ListenerType, ? super ArgType>, ArgType) - Method in interface org.jtrim2.event.ListenerManager
-
Invokes the
onEventmethod of the specifiedEventDispatcherwith the currently registered listeners and the argument specified. - onEvent(EventDispatcher<? super ListenerType, ? super ArgType>, ArgType) - Method in class org.jtrim2.event.OneShotListenerManager
-
Invokes the
onEventmethod of the specifiedEventDispatcherwith the currently registered listeners and the argument specified unless this method has already been called. - onEvent(EventDispatcher<? super ListenerType, ? super ArgType>, ArgType) - Method in class org.jtrim2.event.ProxyListenerRegistry
-
Invokes the
onEventmethod of the specifiedEventDispatcherwith the currently registered listeners and the argument specified. - OperationCanceledException - Exception in org.jtrim2.cancel
-
Thrown by tasks when they detect that they were requested to be canceled.
- OperationCanceledException() - Constructor for exception org.jtrim2.cancel.OperationCanceledException
-
Creates the exception with
nullas itsdetail message. - OperationCanceledException(String) - Constructor for exception org.jtrim2.cancel.OperationCanceledException
-
Creates the exception with a specific
detail message. - OperationCanceledException(String, Throwable) - Constructor for exception org.jtrim2.cancel.OperationCanceledException
-
Creates the exception with a specific
detail messageandcause. - OperationCanceledException(String, Throwable, boolean) - Constructor for exception org.jtrim2.cancel.OperationCanceledException
-
Constructs a new runtime exception with the specified detail message, cause, and writable stack trace enabled or disabled.
- OperationCanceledException(Throwable) - Constructor for exception org.jtrim2.cancel.OperationCanceledException
-
Creates the exception with a specific
cause. - OperationTimeoutException - Exception in org.jtrim2.cancel
-
Defines an exception for when an operation was canceled due to timing out.
- OperationTimeoutException() - Constructor for exception org.jtrim2.cancel.OperationTimeoutException
-
Creates the exception with
nullas itsdetail message. - OperationTimeoutException(String) - Constructor for exception org.jtrim2.cancel.OperationTimeoutException
-
Creates the exception with a specific
detail message. - OperationTimeoutException(String, Throwable) - Constructor for exception org.jtrim2.cancel.OperationTimeoutException
-
Creates the exception with a specific
detail messageandcause. - OperationTimeoutException(String, Throwable, boolean) - Constructor for exception org.jtrim2.cancel.OperationTimeoutException
-
Constructs a new runtime exception with the specified detail message, cause, and writable stack trace enabled or disabled.
- OperationTimeoutException(Throwable) - Constructor for exception org.jtrim2.cancel.OperationTimeoutException
-
Creates the exception with a specific
cause. - org.jtrim2.cancel - package org.jtrim2.cancel
-
Defines classes and interface related to canceling tasks or other operations.
- org.jtrim2.concurrent - package org.jtrim2.concurrent
-
Defines commonly used concurrency utility classes.
- org.jtrim2.concurrent.collections - package org.jtrim2.concurrent.collections
-
Defines thread-safe collection interfaces and implementations.
- org.jtrim2.event - package org.jtrim2.event
-
Contains classes and interfaces for dispatching and handling event notifications.
P
- ProxyListenerRegistry<ListenerType> - Class in org.jtrim2.event
-
Defines a
SimpleListenerRegistrywhich is backed by anotherSimpleListenerRegistry. - ProxyListenerRegistry(SimpleListenerRegistry<? super ListenerType>) - Constructor for class org.jtrim2.event.ProxyListenerRegistry
-
Creates a new
ProxyListenerRegistrywhich is initially backed by the passedListenerRegistry. - put(CancellationToken, T) - Method in interface org.jtrim2.concurrent.collections.TerminableQueue
-
Adds an element to this queue waiting if necessary.
- put(CancellationToken, T, long, TimeUnit) - Method in interface org.jtrim2.concurrent.collections.TerminableQueue
-
Adds an element to this queue waiting if necessary.
R
- registerListener(ListenerType) - Method in class org.jtrim2.event.CopyOnTriggerListenerManager
-
Adds an event listener to this container and returns a reference which can later be used to removed the listener added.
- registerListener(ListenerType) - Method in interface org.jtrim2.event.ListenerRegistry
-
Adds an event listener to this container and returns a reference which can later be used to removed the listener added.
- registerListener(ListenerType) - Method in class org.jtrim2.event.OneShotListenerManager
-
Adds an event listener to this container and returns a reference which can later be used to removed the listener added.
- registerListener(ListenerType) - Method in class org.jtrim2.event.ProxyListenerRegistry
-
Adds an event listener to this container and returns a reference which can later be used to removed the listener added.
- registerListener(ListenerType) - Method in interface org.jtrim2.event.SimpleListenerRegistry
-
Adds an event listener to this container and returns a reference which can later be used to removed the listener added.
- registerOrNotifyListener(ListenerType) - Method in class org.jtrim2.event.OneShotListenerManager
-
Adds an event listener to this container or notifies the listener if
onEventhas already been called and returns a reference which can later be used to removed the listener added. - RepeatingTask - Class in org.jtrim2.concurrent
-
Defines a task which can repeatedly be executed by a
ScheduledExecutorServiceand this task controls if it is needed to be rescheduled. - RepeatingTask(ScheduledExecutorService, long, TimeUnit) - Constructor for class org.jtrim2.concurrent.RepeatingTask
-
Initializes a
RepeatingTaskwith aScheduledExecutorServiceand the time to wait between consecutive execution of this task. - RepeatingTask(ScheduledExecutorService, long, TimeUnit, boolean) - Constructor for class org.jtrim2.concurrent.RepeatingTask
-
Initializes a
RepeatingTaskwith aScheduledExecutorService, the time to wait between consecutive execution of this task and if it need to be rescheduled in case this task throws an unchecked exception. - replaceRegistry(SimpleListenerRegistry<? super ListenerType>) - Method in class org.jtrim2.event.ProxyListenerRegistry
-
Unregisters already added listeners from the current backing registry and registers them with the specified listener registry.
- rethrowCause() - Method in exception org.jtrim2.concurrent.TaskExecutionException
-
Throws the cause of this exception if it is an instance of
ErrororRuntimeException, or throws aRuntimeExceptionexception with the cause of this exception as the cause of the thrown exception. - rethrowCause(Class<? extends T>) - Method in exception org.jtrim2.concurrent.TaskExecutionException
-
Throws the cause of this exception if it is an instance of
ErrororRuntimeExceptionor is of the given type, or throws aRuntimeExceptionexception with the cause of this exception as the cause of the thrown exception. - run() - Method in class org.jtrim2.concurrent.RepeatingTask
-
Invokes the
runAndTest()method and reschedules it to theScheduledExecutorServicespecified at construction time according to the construction time definitions. - runAndTest() - Method in class org.jtrim2.concurrent.RepeatingTask
-
Implement this method to actually execute the given task.
- runConcurrently(Runnable...) - Static method in class org.jtrim2.concurrent.Tasks
-
Executes the specified tasks concurrently, each on a separate thread, attempting to execute them as concurrently as possible.
- runConcurrently(Collection<? extends Runnable>) - Static method in class org.jtrim2.concurrent.Tasks
-
Executes the specified tasks concurrently, each on a separate thread, attempting to execute them as concurrently as possible.
- runnableDispatcher() - Static method in class org.jtrim2.event.EventListeners
-
Returns an
EventDispatcherwhich will simply callrun()method of the listeners passed to theEventDispatcher. - runOnceTask(Runnable) - Static method in class org.jtrim2.concurrent.Tasks
-
Returns a
Runnablewhich will execute the specifiedRunnablebut will execute the specifiedRunnableonly once. - runOnceTaskStrict(Runnable) - Static method in class org.jtrim2.concurrent.Tasks
-
Returns a
Runnablewhich will execute the specifiedRunnablebut will execute the specifiedRunnableonly once, failing on multiple run attempts.
S
- schedule(long, TimeUnit) - Method in class org.jtrim2.concurrent.RepeatingTask
-
Submits this task to be executed a periodically after the given initial delay by the
ScheduledExecutorServicespecified at construction time. - shutdown() - Method in interface org.jtrim2.concurrent.collections.TerminableQueue
-
Prevents new elements to be added to this queue, but keeps the already added elements.
- shutdownAndTryWaitUntilEmpty(CancellationToken, long, TimeUnit) - Method in interface org.jtrim2.concurrent.collections.TerminableQueue
-
Prevents new elements to be added to this queue, and waits until no more elements are remaining in this queue or the given timeout expires.
- shutdownAndWaitUntilEmpty(CancellationToken) - Method in interface org.jtrim2.concurrent.collections.TerminableQueue
-
Prevents new elements to be added to this queue, and waits until no more elements are remaining in this queue.
- signal() - Method in class org.jtrim2.concurrent.WaitableSignal
-
Sets the state of this
WaitableSignalto the signaled state and allows thewaitSignalor thetryWaitSignalmethod to return immediately. - SIGNALING_SIGNAL - Static variable in class org.jtrim2.concurrent.WaitableSignal
-
A
WaitableSignalwhich is already in the signaling state. - SimpleListenerRegistry<ListenerType> - Interface in org.jtrim2.event
-
Defines the interface to register event listeners to be notified later in an implementation dependent way.
- sleep(CancellationToken, long, TimeUnit) - Static method in class org.jtrim2.cancel.CancelableWaits
-
Causes the current thread to sleep until the given time elapses or the specified
CancellationTokensignals a cancellation request.
T
- take(CancellationToken) - Method in interface org.jtrim2.concurrent.collections.TerminableQueue
-
Removes the current head of the queue and returns it waits until it becomes available if the queue is currently empty.
- takeButKeepReserved(CancellationToken) - Method in interface org.jtrim2.concurrent.collections.TerminableQueue
-
Removes the current head of the queue and returns it waits until it becomes available if the queue is currently empty, but keeps reserving the space for the removed element until the returned element is
released. - TaskExecutionException - Exception in org.jtrim2.concurrent
-
Defines that an asynchronously executed task has thrown an unchecked exception.
- TaskExecutionException(String, Throwable) - Constructor for exception org.jtrim2.concurrent.TaskExecutionException
-
Creates a new
TaskExecutionExceptionwith a given cause and exception message. - TaskExecutionException(Throwable) - Constructor for exception org.jtrim2.concurrent.TaskExecutionException
-
Creates a new
TaskExecutionExceptionwith a given cause. - Tasks - Class in org.jtrim2.concurrent
-
Defines static methods to return simple, convenient task related instances.
- TerminableQueue<T> - Interface in org.jtrim2.concurrent.collections
-
Defines a simple queue which can be stopped from accepting any new elements.
- TerminableQueues - Class in org.jtrim2.concurrent.collections
-
Defines factory methods for
TerminableQueue. - TerminatedQueueException - Exception in org.jtrim2.concurrent.collections
-
Thrown if a queue was shut down, and still trying to add or remove element.
- TerminatedQueueException() - Constructor for exception org.jtrim2.concurrent.collections.TerminatedQueueException
-
Creates the exception with
nullas itsdetail message. - TerminatedQueueException(String) - Constructor for exception org.jtrim2.concurrent.collections.TerminatedQueueException
-
Creates the exception with a specific
detail message. - TerminatedQueueException(String, Throwable) - Constructor for exception org.jtrim2.concurrent.collections.TerminatedQueueException
-
Creates the exception with a specific
detail messageandcause. - TerminatedQueueException(String, Throwable, boolean) - Constructor for exception org.jtrim2.concurrent.collections.TerminatedQueueException
-
Constructs a new exception with the specified detail message, cause, and writable stack trace enabled or disabled.
- TerminatedQueueException(Throwable) - Constructor for exception org.jtrim2.concurrent.collections.TerminatedQueueException
-
Creates the exception with a specific
cause. - tryLock(CancellationToken, long, TimeUnit, Lock) - Static method in class org.jtrim2.cancel.CancelableWaits
-
Calls
lock.tryLock(long, TimeUnit)with the specified timeout value and waits until it returns or the specifiedCancellationTokensignals that the waiting must be canceled. - tryTake() - Method in interface org.jtrim2.concurrent.collections.TerminableQueue
-
Removes the current head of the queue and returns it, or returns
nullif the queue is currently empty. - tryTake(CancellationToken, long, TimeUnit) - Method in interface org.jtrim2.concurrent.collections.TerminableQueue
-
Removes the current head of the queue and returns it waiting the given timeout if the queue is currently empty.
- tryTakeButKeepReserved() - Method in interface org.jtrim2.concurrent.collections.TerminableQueue
-
Removes the current head of the queue and returns it, but keeps reserving the space for the removed element until the returned element is
released; or returnsnullif the queue is currently empty. - tryTakeButKeepReserved(CancellationToken, long, TimeUnit) - Method in interface org.jtrim2.concurrent.collections.TerminableQueue
-
Removes the current head of the queue and returns it waiting the given the time if necessary, but keeps reserving the space for the removed element until the returned element is
released; or returnsnullif the timeout elapses before any element could have been retrieved. - tryWaitSignal(CancellationToken, long, TimeUnit) - Method in class org.jtrim2.concurrent.WaitableSignal
-
Waits until another thread invokes the
signal()method or until the specifiedCancellationTokensignals a cancellation request or until the specified timeout elapses.
U
- UNCANCELABLE_TOKEN - Static variable in class org.jtrim2.cancel.Cancellation
-
A
CancellationTokenwhich can never be in the canceled state. - unregister() - Method in class org.jtrim2.event.InitLaterListenerRef
-
Unregisters the listener, so it does not need to be notified of subsequent events.
- unregister() - Method in interface org.jtrim2.event.ListenerRef
-
Unregisters the listener, so it does not need to be notified of subsequent events.
- unregisterAndWait(CancellationToken) - Method in interface org.jtrim2.cancel.WaitableListenerRef
-
Unregisters the associated listener (as the
unregistermethod and waits until it can be ensured that the listener is not going to be notified anymore. - unregistered() - Static method in class org.jtrim2.event.ListenerRefs
-
Returns a
ListenerRefwhich does nothing when unregistered. - unwrap(Throwable) - Static method in class org.jtrim2.concurrent.AsyncTasks
-
Returns the actual error represented by the given exception.
W
- WaitableListenerRef - Interface in org.jtrim2.cancel
-
Defines a
ListenerRefwhich can be used to unregister the associated listener and wait until it can be ensured that the listener is not going to be executed anymore. - WaitableSignal - Class in org.jtrim2.concurrent
-
Defines thread-safe signal for which threads can wait.
- WaitableSignal() - Constructor for class org.jtrim2.concurrent.WaitableSignal
-
Creates a new
WaitableSignalin the non-signaled state. - waitSignal(CancellationToken) - Method in class org.jtrim2.concurrent.WaitableSignal
-
Waits until another thread invokes the
signal()method or until the specifiedCancellationTokensignals a cancellation request. - withoutStackTrace() - Static method in exception org.jtrim2.cancel.OperationCanceledException
-
Returns a new instance of
OperationCanceledExceptionwithout stack trace information. - withoutStackTrace() - Static method in exception org.jtrim2.cancel.OperationTimeoutException
-
Returns a new instance of
OperationTimeoutExceptionwithout stack trace information. - withoutStackTrace() - Static method in exception org.jtrim2.concurrent.collections.TerminatedQueueException
-
Returns a new instance of
TerminatedQueueExceptionwithout stack trace information. - withoutStackTrace(String, Throwable) - Static method in exception org.jtrim2.cancel.OperationCanceledException
-
Returns a new instance of
OperationCanceledExceptionwithout stack trace information. - withoutStackTrace(String, Throwable) - Static method in exception org.jtrim2.cancel.OperationTimeoutException
-
Returns a new instance of
OperationTimeoutExceptionwithout stack trace information. - withoutStackTrace(String, Throwable) - Static method in exception org.jtrim2.concurrent.collections.TerminatedQueueException
-
Returns a new instance of
TerminatedQueueExceptionwithout stack trace information. - withWrappedQueue(ReservablePollingQueue<T>) - Static method in class org.jtrim2.concurrent.collections.TerminableQueues
-
Returns a
TerminableQueueusing the givenReservablePollingQueueto store elements.
All Classes and Interfaces|All Packages|Serialized Form