| Package | Description |
|---|---|
| net.lecousin.framework.application |
Main classes to initialize this library: LCCore and Application.
|
| net.lecousin.framework.concurrent |
Multi-threading framework.
|
| net.lecousin.framework.concurrent.async |
Classes implementing synchronization points such as asynchronous result, join point...
|
| net.lecousin.framework.concurrent.tasks |
Implementations of tasks.
|
| net.lecousin.framework.concurrent.util.production.simple |
Production model: a producer produces objects that are consumed by a consumer.
This allows asynchronous production and consumption. An example is a server task producing an output, and a consumer sending it over the network. |
| net.lecousin.framework.io |
New java Input/Output model adding more flexibility and asynchronous operations.
|
| net.lecousin.framework.io.serialization |
Serialization and deserialization framework.
|
| net.lecousin.framework.io.text |
IO on characters and text.
|
| net.lecousin.framework.io.util |
Utility classes for IO.
|
| net.lecousin.framework.progress |
Progression of asynchronous or background works.
|
| Modifier and Type | Method and Description |
|---|---|
void |
SplashScreen.cancel(CancelException reason) |
| Modifier and Type | Method and Description |
|---|---|
CancelException |
Task.getCancelEvent() |
| Modifier and Type | Method and Description |
|---|---|
void |
Task.cancel(CancelException reason)
Cancel this task.
|
boolean |
Task.cancelIfExecutionNotStarted(CancelException reason)
Cancel this task only if not yet started.
|
void |
Task.Output.unblockCancel(CancelException reason) |
| Modifier and Type | Method and Description |
|---|---|
abstract T |
Task.run()
Method to implement to execute the task.
|
Void |
Task.Cpu.Parameter.FromConsumer.run() |
TResult |
Task.Cpu.Parameter.FromFunction.run() |
static <TError extends Exception> |
Threading.waitFinished(Collection<? extends Task<?,TError>> tasks)
Wait for the given tasks to be done.
|
static <TError extends Exception> |
Threading.waitUnblockedWithError(Collection<AsyncSupplier<?,TError>> tasks)
Wait for the given tasks to finish, if one has an error this error is immediately thrown without waiting for other tasks.
|
| Modifier and Type | Field and Description |
|---|---|
protected CancelException |
AbstractLock.cancel |
| Modifier and Type | Method and Description |
|---|---|
CancelException |
Cancellable.getCancelEvent()
Get the reason of the cancellation.
|
CancelException |
AsyncSupplier.getCancelEvent() |
CancelException |
Async.getCancelEvent() |
CancelException |
AbstractLock.getCancelEvent() |
| Modifier and Type | Method and Description |
|---|---|
void |
Cancellable.cancel(CancelException reason)
Cancel this object: unblock it immediately, and set the cancellation reason.
|
void |
AsyncSupplier.cancel(CancelException reason) |
void |
Async.cancel(CancelException reason) |
void |
AbstractLock.cancel(CancelException reason) |
void |
AsyncSupplier.Listener.cancelled(CancelException event)
Called when the AsyncSupplier is unblocked by a cancellation.
|
void |
AsyncSupplier.unblockCancel(CancelException event)
Cancel this AsyncSupplier.
|
| Modifier and Type | Method and Description |
|---|---|
static <T,TError extends Exception> |
AsyncSupplier.Listener.from(Consumer<T> onReady,
Consumer<TError> onError,
Consumer<CancelException> onCancel)
Create a Listener with the given listeners.
|
static <T,TError extends Exception> |
AsyncSupplier.Listener.from(Runnable onReady,
Consumer<TError> onError,
Consumer<CancelException> onCancel)
Create a Listener with the given listeners.
|
default void |
IAsync.onCancel(Consumer<CancelException> listener)
Call the given listener, only when done due to cancellation.
|
void |
AsyncSupplier.onDone(Consumer<T> onready,
Consumer<TError> onerror,
Consumer<CancelException> oncancel)
Call one of the given listener depending on result.
|
default void |
IAsync.onDone(Runnable onReady,
Consumer<TError> onError,
Consumer<CancelException> onCancel)
Call listeners when unblocked.
|
| Modifier and Type | Method and Description |
|---|---|
T |
AsyncSupplier.blockResult(long timeout)
Block until this AsyncSupplier is unblocked or the given timeout expired,
and return the result in case of success, or throw the error or cancellation.
|
default void |
IAsync.blockThrow(long timeout)
Pause the current thread to wait for this synchronization point to be unblocked.
|
| Constructor and Description |
|---|
Async(CancelException cancel)
Create an unblocked point with a cancellation.
|
AsyncSupplier(T result,
TError error,
CancelException cancel)
Create an unblocked point with the given result, error and cancellation.
|
| Modifier and Type | Method and Description |
|---|---|
Void |
SavePropertiesFileTask.run() |
| Modifier and Type | Method and Description |
|---|---|
void |
ProductTransformation.cancel(CancelException event) |
void |
Producer.cancel(CancelException event)
Cancel any pending production and stop it.
|
void |
Consumer.cancel(CancelException event)
Cancel and stop consumption.
|
| Modifier and Type | Method and Description |
|---|---|
static CancelException |
IO.cancelClosed()
Return a CancelException with message IO closed.
|
| Modifier and Type | Method and Description |
|---|---|
void |
IOUtil.RecursiveAsyncSupplierListener.cancelled(CancelException event) |
static IOException |
IO.errorCancelled(CancelException e)
Create an IOException from a CancelException.
|
| Modifier and Type | Method and Description |
|---|---|
Void |
AbstractSerializer.SerializationTask.run() |
Void |
AbstractDeserializer.DeserializationTask.run() |
| Modifier and Type | Method and Description |
|---|---|
int |
Decoder.decode(char[] chars,
int pos,
int len,
MutableBoolean interrupt,
int min)
Decode characters from the IO.
|
| Modifier and Type | Method and Description |
|---|---|
void |
IOReaderAsProducer.cancel(CancelException event) |
| Modifier and Type | Method and Description |
|---|---|
void |
WorkProgressImpl.cancel(CancelException reason) |
void |
WorkProgress.cancel(CancelException reason)
Cancel the underlying work.
|
void |
FakeWorkProgress.cancel(CancelException reason) |
Copyright © 2019. All rights reserved.