| Package | Description |
|---|---|
| net.lecousin.framework.application |
Main classes to initialize this library: LCCore and Application.
|
| net.lecousin.framework.application.libraries |
Library loading and management.
|
| net.lecousin.framework.concurrent |
Multi-threading framework.
|
| net.lecousin.framework.concurrent.synch |
Classes implementing synchronization points such as asynchronous result, join point...
|
| net.lecousin.framework.concurrent.tasks |
Implementations of tasks.
|
| net.lecousin.framework.io |
New java Input/Output model adding more flexibility and asynchronous operations.
|
| net.lecousin.framework.io.buffering |
IO with bufferization.
|
| net.lecousin.framework.io.defrag |
Implementations of defragmentation algorithms.
|
| net.lecousin.framework.io.encoding |
Utility classes for encoding.
|
| net.lecousin.framework.io.out2in |
Implementations of IO.OutputToInput.
|
| 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.locale |
Localization.
|
| net.lecousin.framework.plugins |
Plugins mechanism.
|
| net.lecousin.framework.progress |
Progression of asynchronous or background works.
|
| net.lecousin.framework.util |
Utility classes.
|
| net.lecousin.framework.xml |
XML Parsing and generation.
|
| net.lecousin.framework.xml.dom |
Simple (partial) DOM implementation.
|
| net.lecousin.framework.xml.serialization |
XML serialization and deserialization.
|
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<IOException> |
Application.loadPreferences()
Load preferences.
|
ISynchronizationPoint<Exception> |
ApplicationBootstrap.RunInMain.run() |
ISynchronizationPoint<Exception> |
ApplicationBootstrap.start(Application app,
WorkProgress progress)
Start the application, and return a synchronization point that will be unblocked when the application
is asked to shutdown.
|
static ISynchronizationPoint<Exception> |
Application.start(Artifact artifact,
boolean debugMode)
Method to call at the beginning of the application, typically in the main method.
|
static ISynchronizationPoint<Exception> |
Application.start(Artifact artifact,
String[] args,
boolean debugMode)
Method to call at the beginning of the application, typically in the main method.
|
static ISynchronizationPoint<Exception> |
Application.start(Artifact artifact,
String[] commandLineArguments,
Map<String,String> properties,
boolean debugMode,
ThreadFactory threadFactory,
LibrariesManager librariesManager)
Method to call at the beginning of the application, typically in the main method.
|
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<Exception> |
LibrariesManager.onLibrariesLoaded()
Return a synchronization point which is blocked until this libraries manager has been initialized and has loaded any required library.
|
ISynchronizationPoint<Exception> |
DefaultLibrariesManager.onLibrariesLoaded() |
| Modifier and Type | Class and Description |
|---|---|
class |
Task.Output
Synchronization point holding the result or error of this task.
|
| Modifier and Type | Method and Description |
|---|---|
void |
BlockedThreadHandler.blocked(ISynchronizationPoint<?> synchPoint,
long timeout)
Singal that the current thread is blocked by the given synchronization point.
|
Task<T,TError> |
Task.ensureUnblocked(ISynchronizationPoint<?>... sp)
Ensure that when this task will be done, successfully or not, the given synchronization point
are unblocked.
|
static void |
ThreadingDebugHelper.registerJoin(JoinPoint<?> jp,
ISynchronizationPoint<?> sp)
Indicates that a JoinPoint is waiting for a synchronization point.
|
void |
Task.startOn(boolean evenOnErrorOrCancel,
ISynchronizationPoint<?>... list)
Start this task once all the given synchronization points are unblocked.
|
void |
Task.startOn(ISynchronizationPoint<? extends Exception> sp,
boolean evenOnErrorOrCancel)
Start this task once the given synchronization point is unblocked.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AsyncWork<T,TError extends Exception>
Same as a SynchronizationPoint, except that it contains a result.
|
class |
JoinPoint<TError extends Exception>
A JoinPoint allows to wait for several synchronization points or events, instead of a single one.
|
class |
LockPoint<TError extends Exception>
A LockPoint is similar to a mutual exclusion, or a synchronized section, but using our threading system, allowing to do something else
while waiting for the lock to be unlocked.
A LockPoint can also be seen as a SynchronizationPoint but reusable. When a thread calls the lock method: if the lock point is not yet locked it becomes locked and the calling thread can continue working, and must call the method unlock once done. if the lock point is already locked, the calling thread is paused, waiting for the lock point to be unlocked. If several threads are waiting for the lock point to be unlocked: Only one is resume and obtain the lock, the others are still paused The order the threads are resumed is undetermined, meaning it is not necessarily in the order they called the lock method |
class |
SynchronizationPoint<TError extends Exception>
Simplest implementation of a synchronization point.
|
class |
WaitingDataQueueSynchronizationPoint<DataType,TError extends Exception>
Like a SynchronizationPoint, but with a queue of waiting data.
|
| Modifier and Type | Method and Description |
|---|---|
void |
JoinPoint.addToJoin(ISynchronizationPoint<? extends TError> sp)
Register the given synchronization point as a waited event for this JoinPoint.
The number of waited events is incremented, and a listener is added to the synchronization point and do the following when the synchronization point is unblocked: Cancel this JoinPoint if the synchronization point is cancelled Unblock this JoinPoint with an error if the synchronization point has been unblocked with an error Call the joined method if the synchronization point has been unblocked with success |
void |
JoinPoint.addToJoinNoException(ISynchronizationPoint<?> sp)
Register the given synchronization point as a waited event for this JoinPoint.
The number of waited events is incremented, and a listener is added to the synchronization point. |
default void |
ISynchronizationPoint.forwardCancel(ISynchronizationPoint<?> sp)
If this synchronization point is cancelled, the given synchronization point will be cancelled as well with the same reason.
|
static JoinPoint<Exception> |
JoinPoint.fromSynchronizationPoints(ISynchronizationPoint<?>... synchPoints)
Shortcut method to create a JoinPoint waiting for the given synchronization points, the JoinPoint is started by this method.
|
static <T extends Exception> |
JoinPoint.fromSynchronizationPointsSimilarError(ISynchronizationPoint<T>... synchPoints)
Shortcut method to create a JoinPoint waiting for the given synchronization points, the JoinPoint is started by this method.
If some given synchronization points are null, they are just skipped.
|
default void |
ISynchronizationPoint.listenAsync(Task<?,? extends Exception> task,
ISynchronizationPoint<TError> onErrorOrCancel)
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 |
ISynchronizationPoint.listenAsyncSP(Task<?,? extends Exception> task,
ISynchronizationPoint<Exception> onErrorOrCancel)
Start the given task when this synchronization point is successfully unblocked, else the error or cancel
event are forwarded to the given synchronization point.
|
void |
AsyncWork.listenInline(Listener<T> onready,
ISynchronizationPoint<TError> onErrorAndCancel)
Call onready on success, or forward error/cancellation to onErrorAndCancel.
|
static void |
JoinPoint.listenInline(Runnable listener,
ISynchronizationPoint<?>... synchPoints)
Shortcut method to create a JoinPoint waiting for the given synchronization points, start the JoinPoint,
and add the given listener to be called when the JoinPoint is unblocked.
|
default void |
ISynchronizationPoint.listenInline(Runnable onReady,
ISynchronizationPoint<TError> onErrorOrCancel)
Call listener when unblocked, or forward error/cancellation to onErrorOrCancel.
|
void |
AsyncWork.listenInline(Runnable onready,
ISynchronizationPoint<TError> onErrorAndCancel) |
static void |
JoinPoint.listenInlineOnAllDone(Runnable listener,
ISynchronizationPoint<?>... synchPoints)
Shortcut method to create a JoinPoint waiting for the given synchronization points, start the JoinPoint,
and add the given listener to be called when the JoinPoint is unblocked.
|
default void |
ISynchronizationPoint.listenInlineSP(Runnable onReady,
ISynchronizationPoint<Exception> onErrorOrCancel)
Call listener when unblocked, or forward error/cancellation to onErrorOrCancel.
|
| Modifier and Type | Method and Description |
|---|---|
static JoinPoint<Exception> |
JoinPoint.fromSynchronizationPoints(Collection<? extends ISynchronizationPoint<?>> synchPoints)
Shortcut method to create a JoinPoint waiting for the given synchronization points, the JoinPoint is started by this method.
|
| Modifier and Type | Method and Description |
|---|---|
static ISynchronizationPoint<IOException> |
SavePropertiesFileTask.savePropertiesFile(Properties properties,
File file,
Charset charset,
byte priority)
Save properties to a file.
|
static ISynchronizationPoint<IOException> |
SavePropertiesFileTask.savePropertiesFile(Properties properties,
ICharacterStream.Writable.Buffered output,
byte priority,
boolean closeStreamAtEnd)
Save properties to a writable character stream.
|
static ISynchronizationPoint<IOException> |
SavePropertiesFileTask.savePropertiesFile(Properties properties,
IO.Writable output,
Charset charset,
byte priority,
boolean closeIOAtEnd)
Save properties to a Writable IO.
|
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<TError> |
DefragmenterMinimumMoves.defragment()
Launch the defragmentation.
|
ISynchronizationPoint<TError> |
DefragmenterMinimumMoves.DataMover.move(DefragmenterMinimumMoves.UsedBlock block,
long offset)
Move the given used block of data to the given new offset.
|
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<IOException> |
Base64Decoder.decode(ByteBuffer buffer)
Start a new Task to decode the given buffer.
|
ISynchronizationPoint<IOException> |
Base64Decoder.decode(CharBuffer buffer)
Start a new Task to decode the given buffer.
|
static ISynchronizationPoint<IOException> |
Base64.encodeAsync(IO.Readable.Buffered io,
ICharacterStream.WriterAsync writer)
Encode the Readable IO into the Writer.
|
static ISynchronizationPoint<IOException> |
Base64.encodeAsync(IO.Readable.Buffered io,
IO.WriterAsync writer)
Encode the Readable IO into the Writer.
|
static ISynchronizationPoint<IOException> |
Base64.encodeAsync(IO.Readable io,
ICharacterStream.WriterAsync writer)
Encode the Readable IO into the Writer.
|
static ISynchronizationPoint<IOException> |
Base64.encodeAsync(IO.Readable io,
IO.WriterAsync writer)
Encode the Readable IO into the Writer.
|
ISynchronizationPoint<IOException> |
Base64Decoder.flush()
Decode any pending bytes, then return a synchronization point that will be unblocked once
the last writing operation is done.
|
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<IOException> |
OutputToInputBuffers.canStartReading() |
ISynchronizationPoint<IOException> |
OutputToInput.canStartReading() |
ISynchronizationPoint<IOException> |
OutputToInputBuffers.canStartWriting() |
ISynchronizationPoint<IOException> |
OutputToInput.canStartWriting() |
protected ISynchronizationPoint<?> |
OutputToInputBuffers.closeUnderlyingResources() |
protected ISynchronizationPoint<?> |
OutputToInput.closeUnderlyingResources() |
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<IOException> |
ICharacterStream.Readable.Buffered.canStartReading()
Return a synchronization point which is unblocked once some characters have been buffered.
|
ISynchronizationPoint<IOException> |
BufferedReadableCharacterStreamLocation.canStartReading() |
protected ISynchronizationPoint<?> |
WritableCharacterStream.closeUnderlyingResources() |
protected ISynchronizationPoint<?> |
TextLineStream.closeUnderlyingResources() |
protected ISynchronizationPoint<?> |
BufferedWritableCharacterStream.closeUnderlyingResources() |
protected ISynchronizationPoint<?> |
BufferedReadableCharacterStreamLocation.closeUnderlyingResources() |
protected ISynchronizationPoint<?> |
BufferedReadableCharacterStream.closeUnderlyingResources() |
ISynchronizationPoint<IOException> |
ICharacterStream.Writable.Buffered.flush()
Flush any buffered character.
|
ISynchronizationPoint<IOException> |
CharacterStreamWritePool.flush()
Returns the synchronization point of the latest write operation.
|
ISynchronizationPoint<IOException> |
BufferedWritableCharacterStream.flush() |
ISynchronizationPoint<IOException> |
CharacterStreamWritePool.write(char c)
Write a single character.
|
ISynchronizationPoint<IOException> |
CharacterStreamWritePool.write(char[] chars)
Write the given characters.
|
ISynchronizationPoint<IOException> |
CharacterStreamWritePool.write(char[] chars,
int offset,
int length)
Write the given characters.
|
ISynchronizationPoint<IOException> |
CharacterStreamWritePool.write(CharBuffer chars)
Write the given characters.
|
ISynchronizationPoint<IOException> |
CharacterStreamWritePool.write(CharBuffer[] chars)
Write the given characters.
|
ISynchronizationPoint<IOException> |
CharacterStreamWritePool.write(CharSequence s)
Write the given string.
|
ISynchronizationPoint<IOException> |
CharacterStreamWritePool.write(IString s)
Write the given string.
|
ISynchronizationPoint<IOException> |
CharacterStreamWritePool.write(String s)
Write the given string.
|
ISynchronizationPoint<IOException> |
ICharacterStream.Writable.Buffered.writeAsync(char c)
Write one character.
|
ISynchronizationPoint<IOException> |
BufferedWritableCharacterStream.writeAsync(char c) |
default ISynchronizationPoint<IOException> |
ICharacterStream.WriterAsync.writeAsync(char[] c)
Write characters.
|
ISynchronizationPoint<IOException> |
WritableCharacterStream.writeAsync(char[] c,
int offset,
int length) |
ISynchronizationPoint<IOException> |
ICharacterStream.WriterAsync.writeAsync(char[] c,
int offset,
int length)
Write characters.
|
ISynchronizationPoint<IOException> |
BufferedWritableCharacterStream.writeAsync(char[] c,
int off,
int len) |
default ISynchronizationPoint<IOException> |
ICharacterStream.WriterAsync.writeAsync(String s)
Write characters of the given string.
|
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<IOException> |
ReadableSeekableToDeterminedSize.canStartReading() |
ISynchronizationPoint<IOException> |
NonBufferedReadableIOAsBuffered.canStartReading() |
ISynchronizationPoint<IOException> |
EmptyReadable.canStartReading() |
ISynchronizationPoint<Exception> |
ReadableSeekableToDeterminedSize.closeAsync() |
protected ISynchronizationPoint<?> |
NonBufferedReadableIOAsBuffered.closeUnderlyingResources() |
protected ISynchronizationPoint<?> |
EmptyReadable.closeUnderlyingResources() |
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<Exception> |
LocaleExtensionPoint.loadPluginConfiguration(IO.Readable io,
ApplicationClassLoader classLoader,
ISynchronizationPoint<?>... startOn) |
ISynchronizationPoint<Exception> |
LocalizedProperties.registerNamespace(String namespace,
String path,
ClassLoader classLoader)
Register the path on which localized properties can be found for a namespace.
|
ISynchronizationPoint<Exception> |
LocalizedProperties.registerNamespaceFrom(Class<?> cl,
String namespace,
String subPath)
Register the path on which localized properties can be found for a namespace.
|
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<Exception> |
LocaleExtensionPoint.loadPluginConfiguration(IO.Readable io,
ApplicationClassLoader classLoader,
ISynchronizationPoint<?>... startOn) |
| Modifier and Type | Method and Description |
|---|---|
default ISynchronizationPoint<Exception> |
CustomExtensionPoint.loadPluginConfiguration(IO.Readable io,
ApplicationClassLoader libraryClassLoader,
ISynchronizationPoint<?>... startOn)
Load configuration.
|
| Modifier and Type | Method and Description |
|---|---|
default ISynchronizationPoint<Exception> |
CustomExtensionPoint.loadPluginConfiguration(IO.Readable io,
ApplicationClassLoader libraryClassLoader,
ISynchronizationPoint<?>... startOn)
Load configuration.
|
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<Exception> |
WorkProgressImpl.getSynch() |
ISynchronizationPoint<Exception> |
WorkProgress.getSynch()
Return a synchronization point that will be unblocked by one of the method done, error or cancel.
|
ISynchronizationPoint<Exception> |
FakeWorkProgress.getSynch() |
| Modifier and Type | Method and Description |
|---|---|
static void |
WorkProgress.linkTo(WorkProgress progress,
ISynchronizationPoint<?> sp)
Link this WorkProgress with the given synchronization point: once the synchronization point is unblocked,
one of the done, error or cancel method is called.
|
| Modifier and Type | Method and Description |
|---|---|
protected <T extends ISynchronizationPoint<?>> |
ConcurrentCloseable.operation(T op) |
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<IOException> |
UnprotectedStringBuffer.CS.canStartReading() |
ISynchronizationPoint<Exception> |
ConcurrentCloseable.closeAsync() |
ISynchronizationPoint<TError> |
AsyncCloseable.closeAsync()
Close asynchronously.
|
protected ISynchronizationPoint<?> |
UnprotectedStringBuffer.CS.closeUnderlyingResources() |
protected abstract ISynchronizationPoint<?> |
ConcurrentCloseable.closeUnderlyingResources() |
ISynchronizationPoint<IOException> |
DirectoryWalker.start(byte priority)
Start the directory analysis.
|
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<IOException> |
XMLWriter.addAttribute(CharSequence name,
CharSequence value)
Add an attribute to the current element.
|
ISynchronizationPoint<IOException> |
XMLWriter.addCData(CharSequence data)
Add a CDATA section inside the current element.
|
ISynchronizationPoint<IOException> |
XMLWriter.addComment(CharSequence comment)
Add a comment inside the current element.
|
ISynchronizationPoint<IOException> |
XMLWriter.addText(CharSequence text)
Add text inside the current element.
|
ISynchronizationPoint<IOException> |
XMLWriter.closeElement()
Close the current element.
|
ISynchronizationPoint<Exception> |
XMLStreamEventsAsync.closeElement()
Go the the END_ELEMENT event corresponding to the current START_ELEMENT (must be called with a current event to START_ELEMENT).
|
ISynchronizationPoint<Exception> |
XMLStreamEventsAsync.closeElement(XMLStreamEvents.ElementContext ctx)
Move forward until the closing tag of the given element is found.
|
ISynchronizationPoint<IOException> |
XMLWriter.end()
End the document, close any open element, and flush the output stream.
|
ISynchronizationPoint<IOException> |
XMLWriter.endOfAttributes()
Signal the end of attributes, so the opening tag can be closed and the content can start.
|
ISynchronizationPoint<Exception> |
XMLStreamEventsAsync.nextStartElement()
Shortcut to move forward to the next START_ELEMENT.
|
ISynchronizationPoint<IOException> |
XMLWriter.openElement(String namespaceURI,
String localName,
Map<String,String> namespaces)
Open a new element.
|
ISynchronizationPoint<Exception> |
XMLStreamEventsAsync.searchElement(String elementName)
Move forward until an element with the given name is found (whatever its depth).
|
ISynchronizationPoint<Exception> |
XMLStreamReaderAsync.start() |
ISynchronizationPoint<Exception> |
XMLStreamEventsRecorder.Async.start() |
abstract ISynchronizationPoint<Exception> |
XMLStreamEventsAsync.start()
Start reading the XML to provide the first event.
|
ISynchronizationPoint<IOException> |
XMLWriter.start(String rootNamespaceURI,
String rootLocalName,
Map<String,String> namespaces)
Start the document with the XML processing instruction if needed, and opening the root element.
|
ISynchronizationPoint<Exception> |
XMLStreamReaderAsync.startRootElement()
Shortcut to move forward to the first START_ELEMENT event, skipping the header or comments.
|
ISynchronizationPoint<IOException> |
XMLWriter.write(Element element)
Write the given DOM element.
|
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<Exception> |
XMLElement.parseContent(XMLStreamEventsAsync stream)
Parse the content of this element.
|
Copyright © 2017. All rights reserved.