A B C D E F G I N O P R S T U W
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- addBucket() - Method in class pl.morgwai.base.utils.concurrent.OrderedConcurrentOutputBuffer
-
Adds a new empty bucket at the end of this buffer.
- afterExecute(Runnable, Throwable) - Method in class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor
-
Subclasses must call
super. - afterExecute(Runnable, Throwable) - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingThreadPoolExecutor
-
Subclasses must call
super. - await(long) - Method in interface pl.morgwai.base.utils.concurrent.Awaitable
-
A timed blocking operation}, such as
Thread.join(long),Object.wait(long),ExecutorService.awaitTermination(long, TimeUnit)etc. - await(long) - Method in interface pl.morgwai.base.utils.concurrent.Awaitable.WithUnit
- await(long, TimeUnit) - Method in interface pl.morgwai.base.utils.concurrent.Awaitable.WithUnit
-
A version of
Awaitable.WithUnit.await(long)method with additionalTimeUnitparam. - Awaitable - Interface in pl.morgwai.base.utils.concurrent
-
An object performing
timed blocking operation, such asThread.join(long),Object.wait(long),ExecutorService.awaitTermination(long, TimeUnit)etc. - Awaitable.AwaitInterruptedException - Exception in pl.morgwai.base.utils.concurrent
-
An
InterruptedExceptionthat contains results ofAwaitable operationspassed to one ofawaitMultipe(...) functionsthat was interrupted. - Awaitable.Entry<T> - Class in pl.morgwai.base.utils.concurrent
- Awaitable.WithUnit - Interface in pl.morgwai.base.utils.concurrent
-
A more precise and flexible
Awaitable. - AwaitInterruptedException(List<T>, List<T>, Iterator<Awaitable.Entry<T>>) - Constructor for exception pl.morgwai.base.utils.concurrent.Awaitable.AwaitInterruptedException
- awaitMultiple(long, boolean, Function<? super T, Awaitable>, List<T>) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitMultiple(long, boolean, Awaitable.Entry<T>...) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitMultiple(long, boolean, Awaitable.WithUnit...) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitMultiple(long, boolean, Awaitable...) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitMultiple(long, TimeUnit, boolean, Function<? super T, Awaitable>, List<T>) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitMultiple(long, TimeUnit, boolean, Iterator<Awaitable.Entry<T>>) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
-
Awaits for multiple
timed blocking operationsspecified byoperationEntries. - awaitMultiple(long, TimeUnit, boolean, Awaitable.Entry<T>...) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitMultiple(long, TimeUnit, boolean, Awaitable.WithUnit...) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitMultiple(long, TimeUnit, boolean, Awaitable...) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitMultiple(long, TimeUnit, Function<? super T, Awaitable>, List<T>) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitMultiple(long, TimeUnit, Awaitable.Entry<T>...) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitMultiple(long, TimeUnit, Awaitable.WithUnit...) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitMultiple(long, TimeUnit, Awaitable...) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitMultiple(long, Function<? super T, Awaitable>, List<T>) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitMultiple(long, Awaitable.Entry<T>...) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitMultiple(long, Awaitable.WithUnit...) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitMultiple(long, Awaitable...) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- awaitTermination() - Method in interface pl.morgwai.base.utils.concurrent.TaskTrackingExecutor
- awaitTermination(long, TimeUnit) - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator
B
- beforeExecute(Thread, Runnable) - Method in class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor
-
Subclasses must call
super. - beforeExecute(Thread, Runnable) - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingThreadPoolExecutor
-
Subclasses must call
super.
C
- cancel(boolean) - Method in class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor.ScheduledExecution
- clearTaskHolderAfterExecute() - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator
-
Hook to be called by a worker thread right after running a task.
- close() - Method in interface pl.morgwai.base.utils.concurrent.OrderedConcurrentOutputBuffer.OutputStream
- close() - Method in class pl.morgwai.base.utils.io.NoCopyByteArrayOutputStream
-
Marks this stream as closed.
- compareTo(Delayed) - Method in class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor.ScheduledExecution
- completableFutureSupplyAsync(Callable<T>, Executor) - Static method in interface pl.morgwai.base.utils.concurrent.ConcurrentUtils
-
Convenient version of
CompletableFuture.supplyAsync(Supplier, Executor)that takes aCallableinstead of aSupplier. - ConcurrentUtils - Interface in pl.morgwai.base.utils.concurrent
-
Various concurrent utility functions.
- ConcurrentUtils.RunnableCallable<T> - Class in pl.morgwai.base.utils.concurrent
-
Wrapper for
Callabletasks passed toConcurrentUtils.completableFutureSupplyAsync(Callable, Executor).
D
- decorateRejectedExecutionHandler(ThreadPoolExecutor) - Static method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator
-
Decorates
executor'sRejectedExecutionHandlerto unwrap tasks fromTaskTrackingExecutor.TaskTrackingExecutorDecorator.TrackableTaskbefore passing them to the original handler. - decorateTask(Runnable, RunnableScheduledFuture<V>) - Method in class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor
-
Decorates
taskusingScheduledTaskTrackingThreadPoolExecutor.ScheduledExecution. - decorateTask(Callable<V>, RunnableScheduledFuture<V>) - Method in class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor
-
Decorates
taskusingScheduledTaskTrackingThreadPoolExecutor.ScheduledExecution.
E
- Entry(T, Awaitable) - Constructor for class pl.morgwai.base.utils.concurrent.Awaitable.Entry
- execute(Runnable) - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator
-
Wraps
taskwith aTaskTrackingExecutor.TaskTrackingExecutorDecorator.TrackableTaskand passes it to its backing executor.
F
- ForcedTerminationAftermath(List<Runnable>, List<Runnable>) - Constructor for class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.ForcedTerminationAftermath
G
- get() - Method in class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor.ScheduledExecution
- get(long, TimeUnit) - Method in class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor.ScheduledExecution
- getBuffer() - Method in class pl.morgwai.base.utils.io.NoCopyByteArrayOutputStream
-
Returns the whole underlying output buffer without copying it.
- getDelay(TimeUnit) - Method in class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor.ScheduledExecution
- getFailed() - Method in exception pl.morgwai.base.utils.concurrent.Awaitable.AwaitInterruptedException
- getInterrupted() - Method in exception pl.morgwai.base.utils.concurrent.Awaitable.AwaitInterruptedException
- getObject() - Method in class pl.morgwai.base.utils.concurrent.Awaitable.Entry
- getOperation() - Method in class pl.morgwai.base.utils.concurrent.Awaitable.Entry
- getRunningTasks() - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.ForcedTerminationAftermath
-
List of tasks that were still running when
TaskTrackingExecutor.tryForceTerminate()was called. - getTask() - Method in class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor.ScheduledExecution
-
The original scheduled task.
- getUnexecuted() - Method in exception pl.morgwai.base.utils.concurrent.Awaitable.AwaitInterruptedException
- getUnexecutedTasks() - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.ForcedTerminationAftermath
-
List of tasks returned by
ExecutorService.shutdownNow(). - getWrappedTask() - Method in class pl.morgwai.base.utils.concurrent.ConcurrentUtils.RunnableCallable
- getWrappedTask() - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator.TrackableTask
I
- isCancelled() - Method in class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor.ScheduledExecution
- isDone() - Method in class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor.ScheduledExecution
- isPeriodic() - Method in class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor.ScheduledExecution
- isShutdown() - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator
- isTerminated() - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator
N
- NamingThreadFactory - Class in pl.morgwai.base.utils.concurrent
-
A factory that names new
Threads based on constructor supplied generator/name. - NamingThreadFactory(String) - Constructor for class pl.morgwai.base.utils.concurrent.NamingThreadFactory
-
Constructs a factory that will create non-daemon threads with
Thread.NORM_PRIORITYand names constructed using scheme<name>-thread-<sequenceNumber>. - NamingThreadFactory(ThreadGroup, IntFunction<String>) - Constructor for class pl.morgwai.base.utils.concurrent.NamingThreadFactory
-
Constructs a factory that will create threads inside
threadGroupwith names constructed usingthreadNameGenerator. - newEntry(T, Awaitable) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- newThread(Runnable) - Method in class pl.morgwai.base.utils.concurrent.NamingThreadFactory
- NoCopyByteArrayOutputStream - Class in pl.morgwai.base.utils.io
-
A
ByteArrayOutputStreamthat allows to directlyaccess its underlying bufferafter the stream was closed. - NoCopyByteArrayOutputStream(int) - Constructor for class pl.morgwai.base.utils.io.NoCopyByteArrayOutputStream
-
Constructs a new stream.
O
- ofEnforcedTermination(ExecutorService) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- ofJoin(Thread) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
-
Creates an
Awaitable.WithUnitofjoining a thread. - ofTermination(ExecutorService) - Static method in interface pl.morgwai.base.utils.concurrent.Awaitable
- OrderedConcurrentOutputBuffer<MessageT> - Class in pl.morgwai.base.utils.concurrent
-
Buffers messages until all of those that should be written before to
the underlying output streamare available, so that they all can bewrittenin the desired order. - OrderedConcurrentOutputBuffer(OrderedConcurrentOutputBuffer.OutputStream<MessageT>) - Constructor for class pl.morgwai.base.utils.concurrent.OrderedConcurrentOutputBuffer
- OrderedConcurrentOutputBuffer.OutputStream<MessageT> - Interface in pl.morgwai.base.utils.concurrent
-
Interface for the underlying stream as well as for
the added buckets.
P
- pl.morgwai.base.utils.concurrent - package pl.morgwai.base.utils.concurrent
-
Multithreading utilities.
- pl.morgwai.base.utils.io - package pl.morgwai.base.utils.io
-
Input/Output utilities.
R
- reset() - Method in class pl.morgwai.base.utils.io.NoCopyByteArrayOutputStream
-
Ensures
close()hasn't been called yet and callssuper. - run() - Method in class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor.ScheduledExecution
- run() - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator.TrackableTask
- RunnableCallable(Callable<T>) - Constructor for class pl.morgwai.base.utils.concurrent.ConcurrentUtils.RunnableCallable
- runningTasks - Variable in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.ForcedTerminationAftermath
S
- ScheduledExecution(Object, RunnableScheduledFuture<V>) - Constructor for class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor.ScheduledExecution
- ScheduledTaskTrackingThreadPoolExecutor - Class in pl.morgwai.base.utils.concurrent
-
A
ScheduledThreadPoolExecutorthat is also aTaskTrackingExecutor. - ScheduledTaskTrackingThreadPoolExecutor(int) - Constructor for class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor
- ScheduledTaskTrackingThreadPoolExecutor(int, RejectedExecutionHandler) - Constructor for class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor
- ScheduledTaskTrackingThreadPoolExecutor(int, ThreadFactory) - Constructor for class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor
- ScheduledTaskTrackingThreadPoolExecutor(int, ThreadFactory, RejectedExecutionHandler) - Constructor for class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor
- ScheduledTaskTrackingThreadPoolExecutor.ScheduledExecution<V> - Class in pl.morgwai.base.utils.concurrent
-
Decorates a
RunnableScheduledFutureto allow to obtain the original scheduled task. - shutdown() - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator
- shutdownNow() - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator
- signalNoMoreBuckets() - Method in class pl.morgwai.base.utils.concurrent.OrderedConcurrentOutputBuffer
-
Indicates that no more new buckets will be
added. - storeTaskIntoHolderBeforeExecute(Runnable) - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator
-
Hook to be called by a worker thread right before running
task.
T
- TaskTrackingExecutor - Interface in pl.morgwai.base.utils.concurrent
-
An
ExecutorServicethat allows to obtain a list of tasks that were still running when anattempt to force terminatewas made. - TaskTrackingExecutor.ForcedTerminationAftermath - Class in pl.morgwai.base.utils.concurrent
-
Returned by
TaskTrackingExecutor.tryForceTerminate(). - TaskTrackingExecutor.TaskTrackingExecutorDecorator - Class in pl.morgwai.base.utils.concurrent
-
A decorator for an
ExecutorServicethat makes its target aTaskTrackingExecutor. - TaskTrackingExecutor.TaskTrackingExecutorDecorator.TrackableTask - Class in pl.morgwai.base.utils.concurrent
- TaskTrackingExecutorDecorator(ExecutorService) - Constructor for class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator
-
Decorates
executorToDecorate. - TaskTrackingExecutorDecorator(ExecutorService, boolean, int) - Constructor for class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator
-
Decorates
executorToDecorate. - TaskTrackingExecutorDecorator(ThreadPoolExecutor) - Constructor for class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator
-
Decorates
executorToDecorateand callsdecorateRejectedExecutionHandler(executorToDecorate). - TaskTrackingThreadPoolExecutor - Class in pl.morgwai.base.utils.concurrent
-
A
TaskTrackingExecutorbased on aThreadPoolExecutor. - TaskTrackingThreadPoolExecutor(int, int, long, TimeUnit, BlockingQueue<Runnable>) - Constructor for class pl.morgwai.base.utils.concurrent.TaskTrackingThreadPoolExecutor
- TaskTrackingThreadPoolExecutor(int, int, long, TimeUnit, BlockingQueue<Runnable>, RejectedExecutionHandler) - Constructor for class pl.morgwai.base.utils.concurrent.TaskTrackingThreadPoolExecutor
- TaskTrackingThreadPoolExecutor(int, int, long, TimeUnit, BlockingQueue<Runnable>, ThreadFactory) - Constructor for class pl.morgwai.base.utils.concurrent.TaskTrackingThreadPoolExecutor
- TaskTrackingThreadPoolExecutor(int, int, long, TimeUnit, BlockingQueue<Runnable>, ThreadFactory, RejectedExecutionHandler) - Constructor for class pl.morgwai.base.utils.concurrent.TaskTrackingThreadPoolExecutor
- toAwaitableOfEnforcedTermination() - Method in interface pl.morgwai.base.utils.concurrent.TaskTrackingExecutor
- toAwaitableOfTermination() - Method in interface pl.morgwai.base.utils.concurrent.TaskTrackingExecutor
- toAwaitableWithUnit() - Method in interface pl.morgwai.base.utils.concurrent.Awaitable
-
Adapts this
AwaitabletoAwaitable.WithUnit. - toAwaitableWithUnit() - Method in interface pl.morgwai.base.utils.concurrent.Awaitable.WithUnit
-
Returns this.
- toString() - Method in class pl.morgwai.base.utils.concurrent.ConcurrentUtils.RunnableCallable
- toString() - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator.TrackableTask
- TrackableTask(Runnable) - Constructor for class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator.TrackableTask
- tryForceTerminate() - Method in class pl.morgwai.base.utils.concurrent.ScheduledTaskTrackingThreadPoolExecutor
- tryForceTerminate() - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator
- tryForceTerminate() - Method in interface pl.morgwai.base.utils.concurrent.TaskTrackingExecutor
-
Calls
ExecutorService.shutdownNow()and returns an object containing a list of tasks that were still running when this method was called, together with the list of tasks returned byExecutorService.shutdownNow(). - tryForceTerminate() - Method in class pl.morgwai.base.utils.concurrent.TaskTrackingThreadPoolExecutor
U
- unexecutedTasks - Variable in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.ForcedTerminationAftermath
- unwrapTask(Runnable) - Static method in class pl.morgwai.base.utils.concurrent.TaskTrackingExecutor.TaskTrackingExecutorDecorator
-
If
taskis an instance ofTaskTrackingExecutor.TaskTrackingExecutorDecorator.TrackableTaskreturnstask.getWrappedTask(), otherwise justtask.
W
- waitForMonitorCondition(Object, BooleanSupplier, long) - Static method in interface pl.morgwai.base.utils.concurrent.ConcurrentUtils
- waitForMonitorCondition(Object, BooleanSupplier, long, TimeUnit) - Static method in interface pl.morgwai.base.utils.concurrent.ConcurrentUtils
-
Similar to
Object.wait(long, int), but not affected by spurious wakeup nor bynotificationsnot related tocondition. - wrappedTask - Variable in class pl.morgwai.base.utils.concurrent.ConcurrentUtils.RunnableCallable
- write(byte[], int, int) - Method in class pl.morgwai.base.utils.io.NoCopyByteArrayOutputStream
-
Ensures
close()hasn't been called yet and callssuper. - write(int) - Method in class pl.morgwai.base.utils.io.NoCopyByteArrayOutputStream
-
Ensures
close()hasn't been called yet and callssuper. - write(MessageT) - Method in interface pl.morgwai.base.utils.concurrent.OrderedConcurrentOutputBuffer.OutputStream
All Classes All Packages