| Package | Description |
|---|---|
| net.lecousin.framework.application |
Main classes to initialize this library: LCCore and Application.
|
| net.lecousin.framework.collections |
Implementations of collections.
|
| 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.tasks.drives |
Tasks on files or directories.
|
| 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.progress |
Progression of asynchronous or background works.
|
| net.lecousin.framework.util |
Utility classes.
|
| net.lecousin.framework.xml |
XML Parsing and generation.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
ApplicationBootstrap.RunInMain
Utility class that runs the bootstrap in a task.
|
| Modifier and Type | Field and Description |
|---|---|
protected LinkedList<Pair<CollectionListener<T>,Task<Void,NoException>>> |
CollectionListener.Keep.listeners |
| Modifier and Type | Class and Description |
|---|---|
static class |
Task.Cpu<T,TError extends Exception>
Task using only CPU resource.
|
static class |
Task.Cpu.FromRunnable
CPU task from a Runnable.
|
static class |
Task.Cpu.FromSupplierThrows<T,TError extends Exception>
CPU task from a Supplier.
|
static class |
Task.Cpu.Parameter<TParam,TResult,TError extends Exception>
Task using only CPU resource and holding a parameter.
|
static class |
Task.Cpu.Parameter.FromConsumer<TParam>
CPU task with parameter from a Runnable.
|
static class |
Task.Cpu.Parameter.FromFunction<TParam,TResult>
CPU task with parameter from a Function.
|
static class |
Task.Done<T,TError extends Exception>
Task already done with a result or an error.
|
static class |
Task.OnFile<T,TError extends Exception>
Task using a only a file resource.
|
static class |
Task.OnFile.Parameter<TParam,TResult,TError extends Exception>
Task using only a file resource and holding a parameter.
|
static class |
Task.Parameter<TParam,TResult,TError extends Exception>
Task holding a parameter.
|
static class |
Task.Unmanaged<TResult,TError extends Exception>
Unmanaged task that may use any resource and block at any time without using a synchronization point.
|
| Modifier and Type | Method and Description |
|---|---|
Task<T,TError> |
Task.ensureUnblocked(IAsync<?>... sp)
Ensure that when this task will be done, successfully or not, the given synchronization point
are unblocked.
|
Task<T,TError> |
Task.executeAgainAt(long time)
Execute again this task at the given time.
|
Task<T,TError> |
Task.executeAgainIn(long delay)
Execute again this task in the given delay.
|
Task<T,TError> |
Task.executeAt(long time)
Execute this task at the given time.
|
Task<T,TError> |
Task.executeEvery(long delay,
long initialDelay)
Execute this task repeatedly.
|
Task<T,TError> |
Task.executeIn(long delay)
Execute this task in the given delay in milliseconds.
|
Task<T,TError> |
Task.Output.getTask() |
Task<?,?> |
TaskPriorityManager.peekNext()
Return a task if one is immediately available, or null.
|
Task<?,?> |
StandaloneTaskPriorityManager.peekNext() |
Task<?,?> |
TaskPriorityManager.peekNextOrWait()
Return a task if one is immediately available, or pause the calling thread.
|
Task<?,?> |
StandaloneTaskPriorityManager.peekNextOrWait() |
Task<T,TError> |
Task.start()
Ask to start the task.
|
| Modifier and Type | Method and Description |
|---|---|
List<Task<?,?>> |
TaskPriorityManager.removeAllPendingTasks()
always called inside a synchronized block on this instance.
|
List<Task<?,?>> |
StandaloneTaskPriorityManager.removeAllPendingTasks() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ThreadPoolTaskManager.add(Task<?,?> t) |
void |
TaskPriorityManager.add(Task<?,?> task)
Add a task to execute.
|
protected void |
TaskManager.add(Task<?,?> t) |
void |
StandaloneTaskPriorityManager.add(Task<?,?> task) |
void |
Task.ondone(Task<?,?> todo,
boolean evenIfErrorOrCancel)
Start the given task once this task is done.
|
boolean |
TaskPriorityManager.remove(Task<?,?> task)
Remove a task.
|
boolean |
StandaloneTaskPriorityManager.remove(Task<?,?> task) |
void |
Task.startOnDone(Task<?,?> task)
Start this task once the given task is done.
|
| Modifier and Type | Method and Description |
|---|---|
static <TError extends Exception> |
Threading.waitFinished(Collection<? extends Task<?,TError>> tasks)
Wait for the given tasks to be done.
|
static void |
Threading.waitOneFinished(List<? extends Task<?,?>> tasks)
Wait for one of the given task to be done.
|
| Modifier and Type | Method and Description |
|---|---|
void |
JoinPoint.addToJoin(Task<?,? extends TError> task)
Register the given task as a waited event for this JoinPoint.
Equivalent to addToJoin(task.getSynch()) |
static JoinPoint<Exception> |
JoinPoint.fromTasks(Task<?,?>... tasks)
Shortcut method to create a JoinPoint waiting for the given tasks, the JoinPoint is started by this method.
If any task has error or is cancelled, the join point is immediately unblocked, even other tasks are still pending.
|
default void |
IAsync.thenStart(Task<?,? extends Exception> task,
boolean evenIfErrorOrCancel)
Start the given task when this asynchronous unit is unblocked.
|
default void |
IAsync.thenStart(Task<?,? extends Exception> task,
IAsync<TError> onErrorOrCancel)
Start the given task when this asynchronous unit is successfully unblocked, else the error or cancel
event are forwarded to the given asynchronous unit.
|
default <TError2 extends Exception> |
IAsync.thenStart(Task<?,? extends Exception> task,
IAsync<TError2> onErrorOrCancel,
Function<TError,TError2> errorConverter)
Start the given task when this synchronization point is successfully unblocked, else the error or cancel
event are forwarded to the given synchronization point.
|
default void |
IAsync.thenStart(Task<?,? extends Exception> task,
Runnable onErrorOrCancel)
Start the given task when this asynchronous unit is unblocked.
|
| Modifier and Type | Method and Description |
|---|---|
static JoinPoint<Exception> |
JoinPoint.fromTasks(Collection<? extends Task<?,?>> tasks)
Shortcut method to create a JoinPoint waiting for the given tasks, the JoinPoint is started by this method.
If any task has error or is cancelled, the join point is immediately unblocked, even other tasks are still pending.
|
static JoinPoint<NoException> |
JoinPoint.fromTasksNoErrorOrCancel(Collection<? extends Task<?,?>> tasks)
Shortcut method to create a JoinPoint waiting for the given tasks, the JoinPoint is started by this method.
The JoinPoint is not unblocked until all tasks are done.
|
| Modifier and Type | Class and Description |
|---|---|
class |
SavePropertiesFileTask
Task saving properties to a file.
|
| Modifier and Type | Class and Description |
|---|---|
class |
CreateDirectoryTask
Task to create a directory.
|
class |
DirectoryReader
Read the content of a directory (files and sub-directories).
|
static class |
DirectoryReader.ListSubDirectories
Task to list only sub-directories.
|
class |
DriveOperationsSequence
Task to execute a sequence of operation on a file, and avoid separate them into different tasks.
|
class |
FullReadFileTask
Task to read all bytes from a file.
|
class |
GetFileInfoTask
Task to retrieve a FileInfo from a file.
|
class |
RemoveDirectoryContentTask
Task to remove the content of a directory (all its files and sub-directories).
|
class |
RemoveDirectoryTask
Task to remove a directory and all its content.
|
class |
RemoveFileTask
Task to remove a file.
|
class |
RenameFileTask
Task to create a directory.
|
| Modifier and Type | Method and Description |
|---|---|
Task<Void,IOException> |
FileAccess.closeAsync() |
Task<Void,IOException> |
FileAccess.getStartingTask() |
Task<Integer,IOException> |
FileAccess.readAsync(long pos,
ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone) |
Task<Integer,IOException> |
FileAccess.readFullyAsync(long pos,
ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone) |
Task<Long,IOException> |
FileAccess.seekAsync(IO.Seekable.SeekType type,
long move,
boolean allowAfterEnd,
Consumer<Pair<Long,IOException>> ondone) |
Task<Void,IOException> |
FileAccess.setSizeAsync(long newSize) |
Task<Long,IOException> |
FileAccess.skipAsync(long move,
Consumer<Pair<Long,IOException>> ondone) |
Task<Integer,IOException> |
FileAccess.writeAsync(long pos,
ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone) |
| Modifier and Type | Method and Description |
|---|---|
static Task<Integer,IOException> |
IOUtil.readAsyncUsingSync(IO.Readable.Seekable io,
long pos,
ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone)
Implement an asynchronous read using a task calling the synchronous one.
|
static Task<Integer,IOException> |
IOUtil.readAsyncUsingSync(IO.Readable io,
ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone)
Implement an asynchronous read using a task calling the synchronous one.
|
static Task<Integer,IOException> |
IOUtil.readFullyAsyncUsingSync(IO.Readable.Seekable io,
long pos,
ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone)
Implement an asynchronous read using a task calling the synchronous one.
|
static Task<Integer,IOException> |
IOUtil.readFullyAsyncUsingSync(IO.Readable io,
ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone)
Implement an asynchronous read using a task calling the synchronous one.
|
static Task<Long,IOException> |
IOUtil.seekAsyncUsingSync(IO.Seekable io,
IO.Seekable.SeekType type,
long move,
Consumer<Pair<Long,IOException>> ondone)
Implement an asynchronous seek using a task calling a synchronous one.
|
static Task<Void,IOException> |
IOUtil.setSizeAsyncUsingSync(IO.Resizable io,
long newSize,
byte priority)
Implement an asynchronous setSize using a task calling a synchronous one.
|
static Task<Integer,IOException> |
IOUtil.writeAsyncUsingSync(IO.Writable.Seekable io,
long pos,
ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone)
Implement an asynchronous write using a task calling a synchronous write.
|
static Task<Integer,IOException> |
IOUtil.writeAsyncUsingSync(IO.Writable io,
ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone)
Implement an asynchronous write using a task calling a synchronous write.
|
| Modifier and Type | Method and Description |
|---|---|
static <T,T2> void |
IOUtil.listenOnDone(AsyncSupplier<T,IOException> toListen,
Task<?,?> onReady,
IAsync<IOException> onErrorOrCancel,
Consumer<Pair<T2,IOException>> ondone)
Listen to
toListen, then launch onReady if it succeed. |
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractDeserializer.DeserializationTask
Shortcut to easily create a Task.
|
protected class |
AbstractSerializationSpecWriter.SpecTask
Utility to create tasks.
|
protected class |
AbstractSerializer.SerializationTask
Utility class to create tasks along the process.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
WorkProgress.linkTo(WorkProgress progress,
Task<?,?> task)
Link this WorkProgress with the given task: once the task is done,
one of the done, error or cancel method is called.
|
| Modifier and Type | Method and Description |
|---|---|
protected <TE extends Exception,TR,T extends Task<TR,TE>> |
ConcurrentCloseable.operation(T task) |
| Modifier and Type | Class and Description |
|---|---|
protected class |
XMLStreamEventsAsync.Next
Shortcut to create a task going to the next event, and call onNext if an event is successfully found.
|
protected class |
XMLStreamEventsAsync.ParsingTask
Shortcut class to create a task.
|
Copyright © 2019. All rights reserved.