Skip navigation links
A B C D E F G I L O P R S T W 

A

action() - Method in class org.michailov.async.AsyncAgent
action() - Method in class org.michailov.async.io.AsyncByteStreamReader
"action" function that reads bytes from the stream and writes them to the ring buffer.
action() - Method in class org.michailov.async.io.AsyncByteStreamWriter
"action" function that reads bytes from the ring buffer and writes them to the stream.
action() - Method in class org.michailov.async.io.AsyncCharDecoder
"action" function that reads bytes from the input byte ring buffer and writes chars to the output char ring buffer.
action() - Method in class org.michailov.async.io.AsyncCharEncoder
"action" function that reads chars from the input char ring buffer and writes bytes to the output byte ring buffer.
action() - Method in class org.michailov.async.io.AsyncLineJoiner
"action" function that reads chars from the input char ring buffer and writes lines to the output string ring buffer.
action() - Method in class org.michailov.async.io.AsyncLineSplitter
"action" function that reads chars from the input char ring buffer and writes lines to the output string ring buffer.
action() - Method in class org.michailov.async.io.AsyncRingBufferWatcher
"action" function that invokes the onAvailableToRead callback synchronously.
action() - Method in class org.michailov.async.io.AsyncTextStreamReader
"action" function that gets executed as part of the apply loop.
action() - Method in class org.michailov.async.io.AsyncTextStreamWriter
"action" function that gets executed as part of the apply loop.
advanceReadPosition(int) - Method in class org.michailov.async.io.RingBuffer
This method must be called to indicate a successful read operation.
advanceWritePosition(int) - Method in class org.michailov.async.io.RingBuffer
This method must be called to indicate a successful write operation.
applyAsync() - Method in class org.michailov.async.AsyncAgent
applyAsync(Predicate<S>, Function<S, R>, S) - Static method in class org.michailov.async.WhenReady
Returns a future that represents the continuation of completeAsync(java.util.function.Predicate<S>, R, S) that executes action.
applyAsync(Predicate<S>, Function<S, R>, S, AsyncOptions) - Static method in class org.michailov.async.WhenReady
Returns a future that represents the continuation of completeAsync(java.util.function.Predicate<S>, R, S) that executes action.
AsyncAgent - Class in org.michailov.async
Abstract functionality that encapsulates context in which WhenReady patterns are called.
AsyncAgent(AsyncOptions) - Constructor for class org.michailov.async.AsyncAgent
Base constructor for derived classes to call.
AsyncByteStreamReader - Class in org.michailov.async.io
Asynchronous byte reader over a plain old InputStream wrapped in an EOFInputStream.
AsyncByteStreamReader(EOFInputStream, ByteRingBuffer, AsyncOptions) - Constructor for class org.michailov.async.io.AsyncByteStreamReader
Constructs a new AsyncByteStreamReader instance to read from the given InputStream into the given ByteRingBuffer.
AsyncByteStreamWriter - Class in org.michailov.async.io
Asynchronous byte writer over a plain old OutputStream.
AsyncByteStreamWriter(OutputStream, ByteRingBuffer, AsyncOptions) - Constructor for class org.michailov.async.io.AsyncByteStreamWriter
Constructs a new AsyncByteStreamWriter instance to write to the given OutputStream from the given ByteRingBuffer.
AsyncCharDecoder - Class in org.michailov.async.io
Asynchronous decoder of bytes into chars.
AsyncCharDecoder(ByteRingBuffer, CharRingBuffer, CharsetAsyncOptions) - Constructor for class org.michailov.async.io.AsyncCharDecoder
Constructs an AsyncCharDecoder instance over the given ring buffers.
AsyncCharEncoder - Class in org.michailov.async.io
Asynchronous encoder of chars into bytes.
AsyncCharEncoder(CharRingBuffer, ByteRingBuffer, CharsetAsyncOptions) - Constructor for class org.michailov.async.io.AsyncCharEncoder
Constructs an AsyncCharEncoder instance over the given ring buffers.
AsyncException - Exception in org.michailov.async
This unchecked exception type should be used by predicates and functions to report checked exceptions to the WhenReady framework is not possible from lambdas.
AsyncException() - Constructor for exception org.michailov.async.AsyncException
 
AsyncException(String) - Constructor for exception org.michailov.async.AsyncException
 
AsyncException(Throwable) - Constructor for exception org.michailov.async.AsyncException
 
AsyncException(String, Throwable) - Constructor for exception org.michailov.async.AsyncException
 
AsyncException(String, Throwable, boolean, boolean) - Constructor for exception org.michailov.async.AsyncException
 
AsyncLineJoiner - Class in org.michailov.async.io
Asynchronous joiner of discrete lines into a sequence of chars.
AsyncLineJoiner(StringRingBuffer, CharRingBuffer, LineAsyncOptions) - Constructor for class org.michailov.async.io.AsyncLineJoiner
Constructs an AsyncLineJoiner instance over the given ring buffers.
AsyncLineSplitter - Class in org.michailov.async.io
Asynchronous splitter of chars into lines.
AsyncLineSplitter(CharRingBuffer, StringRingBuffer, LineAsyncOptions) - Constructor for class org.michailov.async.io.AsyncLineSplitter
Constructs an AsyncLineSpliter instance over the given ring buffers.
AsyncOptions - Class in org.michailov.async
Common options that control the execution of async methods from this package.
AsyncOptions() - Constructor for class org.michailov.async.AsyncOptions
 
AsyncRingBufferWatcher<TRingBuffer extends RingBuffer> - Class in org.michailov.async.io
Asynchronous watcher of a RingBuffer.
AsyncRingBufferWatcher(TRingBuffer, Consumer<TRingBuffer>, AsyncOptions) - Constructor for class org.michailov.async.io.AsyncRingBufferWatcher
Constructs an AsyncCharDecoder instance over the given ring buffers.
AsyncTextStreamReader - Class in org.michailov.async.io
Asynchronous text line reader over a plain old InputStream wrapped in an EOFInputStream.
AsyncTextStreamReader(EOFInputStream, TextStreamAsyncOptions) - Constructor for class org.michailov.async.io.AsyncTextStreamReader
Constructs a new AsyncTextStreamReader instance to read from the given InputStream.
AsyncTextStreamReader(EOFInputStream, Consumer<StringRingBuffer>, TextStreamAsyncOptions) - Constructor for class org.michailov.async.io.AsyncTextStreamReader
Constructs a new AsyncTextStreamReader instance to read from the given InputStream.
AsyncTextStreamReader(EOFInputStream, ByteRingBuffer, CharRingBuffer, StringRingBuffer, Consumer<StringRingBuffer>, TextStreamAsyncOptions) - Constructor for class org.michailov.async.io.AsyncTextStreamReader
Constructs a new AsyncTextStreamReader instance to read from the given InputStream.
AsyncTextStreamWriter - Class in org.michailov.async.io
Asynchronous text line writer over a plain old OutputStream.
AsyncTextStreamWriter(OutputStream, TextStreamAsyncOptions) - Constructor for class org.michailov.async.io.AsyncTextStreamWriter
Constructs a new AsyncTextStreamWriter instance to write to the given OutputStream.
AsyncTextStreamWriter(OutputStream, StringRingBuffer, CharRingBuffer, ByteRingBuffer, TextStreamAsyncOptions) - Constructor for class org.michailov.async.io.AsyncTextStreamWriter
Constructs a new AsyncTextStreamWriter instance to write into the given OutputStream.
available() - Method in class org.michailov.async.io.EOFInputStream
 

B

ByteRingBuffer - Class in org.michailov.async.io
This is a concrete implementation of RingBuffer of a byte[].
ByteRingBuffer(int) - Constructor for class org.michailov.async.io.ByteRingBuffer
Constructs a ring buffer over an implicitly allocated byte[].
ByteRingBuffer(byte[]) - Constructor for class org.michailov.async.io.ByteRingBuffer
Constructs a ring buffer over an existing byte[].
byteRingBufferCapacity - Variable in class org.michailov.async.io.TextStreamAsyncOptions
Capacity of the implicit ByteRingBuffer used for copying bytes to/from the target byte stream.

C

CharRingBuffer - Class in org.michailov.async.io
This is a concrete implementation of RingBuffer of a char[].
CharRingBuffer(int) - Constructor for class org.michailov.async.io.CharRingBuffer
Constructs a ring buffer over an implicitly allocated char[].
CharRingBuffer(char[]) - Constructor for class org.michailov.async.io.CharRingBuffer
Constructs a ring buffer over an existing char[].
charRingBufferCapacity - Variable in class org.michailov.async.io.TextStreamAsyncOptions
Capacity of the implicit CharRingBuffer used for encoding/decoding of char to/from bytes.
charset - Variable in class org.michailov.async.io.CharsetAsyncOptions
Charset for the encoded/decoded bytes.
CharsetAsyncOptions - Class in org.michailov.async.io
Options that control the execution of async char encoding and decoding.
CharsetAsyncOptions() - Constructor for class org.michailov.async.io.CharsetAsyncOptions
 
completeAsync(Predicate<S>, R, S) - Static method in class org.michailov.async.WhenReady
Returns a future that gets completed with a value of result when the ready predicate returns true.
completeAsync(Predicate<S>, R, S, AsyncOptions) - Static method in class org.michailov.async.WhenReady
Returns a future that gets completed with a value of result when the ready predicate returns true.
CR - Static variable in class org.michailov.async.io.LineAsyncOptions
The CR char ( ).
CRLF - Static variable in class org.michailov.async.io.LineAsyncOptions
The CR and LF chars ( ).

D

DEFAULT - Static variable in class org.michailov.async.AsyncOptions
Shared instance that represents the "default" set of options.
DEFAULT - Static variable in class org.michailov.async.io.CharsetAsyncOptions
Shared instance that represents the "default" set of options.
DEFAULT_BYTE_RING_BUFFER_CAPACITY - Static variable in class org.michailov.async.io.TextStreamAsyncOptions
Default value for TextStreamAsyncOptions.byteRingBufferCapacity - 2048 bytes.
DEFAULT_CHAR_RING_BUFFER_CAPACITY - Static variable in class org.michailov.async.io.TextStreamAsyncOptions
Default value for TextStreamAsyncOptions.charRingBufferCapacity - 1024 chars.
DEFAULT_ESTIMATED_LINE_LENGTH - Static variable in class org.michailov.async.io.LineAsyncOptions
Default estimated line length in chars - 1024 chars.
DEFAULT_STRING_RING_BUFFER_CAPACITY - Static variable in class org.michailov.async.io.TextStreamAsyncOptions
Default value for TextStreamAsyncOptions.stringRingBufferCapacity - 64 strings.
done() - Method in class org.michailov.async.AsyncAgent
done() - Method in class org.michailov.async.io.AsyncByteStreamReader
 
done() - Method in class org.michailov.async.io.AsyncByteStreamWriter
 
done() - Method in class org.michailov.async.io.AsyncCharDecoder
"done" predicate that returns true when this async agent wants to quit the current async loop.
done() - Method in class org.michailov.async.io.AsyncCharEncoder
"done" predicate that returns true when this async agent wants to quit the current async loop.
done() - Method in class org.michailov.async.io.AsyncLineJoiner
"done" predicate that returns true when this async agent wants to quit the current async loop.
done() - Method in class org.michailov.async.io.AsyncLineSplitter
"done" predicate that returns true when this async agent wants to quit the current async loop.
done() - Method in class org.michailov.async.io.AsyncRingBufferWatcher
"done" predicate that returns true when this async agent wants to quit the current async loop.
done() - Method in class org.michailov.async.io.AsyncTextStreamReader
"done" predicate that returns true when this async agent wants to quit the current async loop.
done() - Method in class org.michailov.async.io.AsyncTextStreamWriter
"done" predicate that returns true when this async agent wants to quit the current async loop.

E

eof() - Method in class org.michailov.async.io.EOFInputStream
Used by the consuming AsyncByteStreamReader to check whether EOF has been reached.
EOFInputStream - Class in org.michailov.async.io
An InputStream that can explicitly report EOF.
EOFInputStream(InputStream, Predicate<AsyncByteStreamReader>) - Constructor for class org.michailov.async.io.EOFInputStream
Constructs a new EOFInputStream.
EOFInputStream(InputStream, Predicate<AsyncByteStreamReader>, ToIntFunction<AsyncByteStreamReader>) - Constructor for class org.michailov.async.io.EOFInputStream
Constructs a new EOFInputStream.
EOFInputStream() - Constructor for class org.michailov.async.io.EOFInputStream
Implicit constructor for derived classes.
estimatedLineLength - Variable in class org.michailov.async.io.LineAsyncOptions
Estimated line length in chars.

F

fromFile(File) - Static method in class org.michailov.async.io.EOFInputStream
Factory method for Process.getInputStream().
fromProcess(Process) - Static method in class org.michailov.async.io.EOFInputStream
Factory method for Process.getInputStream().

G

getAsyncStringRingBufferWatcher() - Method in class org.michailov.async.io.AsyncTextStreamReader
Returns the underlying AsyncRingBufferWatcher that watches the StringRingBuffer.
getAvailableToRead() - Method in class org.michailov.async.io.RingBuffer
Gets the count of items that are available to be read.
getAvailableToReadStraight() - Method in class org.michailov.async.io.RingBuffer
Gets the count of items that are available to be read at once.
getAvailableToWrite() - Method in class org.michailov.async.io.RingBuffer
Gets the count of items that are available to be written.
getAvailableToWriteStraight() - Method in class org.michailov.async.io.RingBuffer
Gets the count of items that are available to be written at once.
getBuffer() - Method in class org.michailov.async.io.ByteRingBuffer
Gets the underlying byte[].
getBuffer() - Method in class org.michailov.async.io.CharRingBuffer
Gets the underlying char[].
getBuffer() - Method in class org.michailov.async.io.StringRingBuffer
Gets the underlying String[].
getBufferLength() - Method in class org.michailov.async.io.RingBuffer
Gets the length of the underlying buffer.
getByteRingBuffer() - Method in class org.michailov.async.io.AsyncByteStreamReader
Returns the attached ring buffer where bytes will be written.
getByteRingBuffer() - Method in class org.michailov.async.io.AsyncByteStreamWriter
Returns the attached ring buffer where bytes will be read from.
getByteRingBuffer() - Method in class org.michailov.async.io.AsyncCharDecoder
Returns the attached byte ring buffer from where bytes will be read.
getByteRingBuffer() - Method in class org.michailov.async.io.AsyncCharEncoder
Returns the attached byte ring buffer where bytes will be written.
getCharRingBuffer() - Method in class org.michailov.async.io.AsyncCharDecoder
Returns the attached char ring buffer where chars will be written.
getCharRingBuffer() - Method in class org.michailov.async.io.AsyncCharEncoder
Returns the attached char ring buffer from where chars will be read.
getCharRingBuffer() - Method in class org.michailov.async.io.AsyncLineJoiner
Returns the attached char ring buffer from where chars will be written.
getCharRingBuffer() - Method in class org.michailov.async.io.AsyncLineSplitter
Returns the attached char ring buffer from where chars will be read from.
getInputStream() - Method in class org.michailov.async.io.AsyncByteStreamReader
Returns the underlying InputStream.
getLogger() - Static method in class org.michailov.async.Logger
Gets the shared instance.
getOutputStream() - Method in class org.michailov.async.io.AsyncByteStreamWriter
Returns the underlying OutputStream.
getReadPosition() - Method in class org.michailov.async.io.RingBuffer
Gets the current virtual read position.
getRingBuffer() - Method in class org.michailov.async.io.AsyncRingBufferWatcher
Returns the watched ring buffer.
getStringRingBuffer() - Method in class org.michailov.async.io.AsyncLineJoiner
Returns the attached string ring buffer where lines will be read from.
getStringRingBuffer() - Method in class org.michailov.async.io.AsyncLineSplitter
Returns the attached string ring buffer where lines will be written.
getStringRingBuffer() - Method in class org.michailov.async.io.AsyncTextStreamReader
Returns the underlying StringRingBuffer where text lines are placed.
getStringRingBuffer() - Method in class org.michailov.async.io.AsyncTextStreamWriter
Returns the underlying StringRingBuffer from where text lines are read.
getTotalReadCount() - Method in class org.michailov.async.io.RingBuffer
Gets the total count of read items.
getTotalWriteCount() - Method in class org.michailov.async.io.RingBuffer
Gets the total count of written items.
getWritePosition() - Method in class org.michailov.async.io.RingBuffer
Gets the current virtual write position.

I

isEmpty() - Method in class org.michailov.async.io.AsyncTextStreamWriter
Checks whether all the underlying ring buffers are empty.
isEOF() - Method in class org.michailov.async.io.AsyncByteStreamReader
Checks whether this reader has reached EOF of the stream.
isEOF() - Method in class org.michailov.async.io.AsyncByteStreamWriter
Checks whether this writer has reached EOF of the byte ring buffer.
isEOF() - Method in class org.michailov.async.io.AsyncCharDecoder
Checks whether this decoder has reached EOF of the input byte ring buffer.
isEOF() - Method in class org.michailov.async.io.AsyncCharEncoder
Checks whether this decoder has reached EOF of the input char ring buffer.
isEOF() - Method in class org.michailov.async.io.AsyncLineJoiner
Checks whether this line joiner has reached EOF of the input string ring buffer.
isEOF() - Method in class org.michailov.async.io.AsyncLineSplitter
Checks whether this line splitter has reached EOF of the input char ring buffer.
isEOF() - Method in class org.michailov.async.io.AsyncRingBufferWatcher
Checks whether this watcher has reached EOF of the watched ring buffer.
isEOF() - Method in class org.michailov.async.io.AsyncTextStreamReader
Checks whether this text stream reader has reached EOF.
isEOF() - Method in class org.michailov.async.io.AsyncTextStreamWriter
Checks whether this text stream writer has reached EOF.
isEOF() - Method in class org.michailov.async.io.RingBuffer
Gets the EOF state of this ring buffer.
isIdle() - Method in class org.michailov.async.AsyncAgent
Checks whether this AsyncAgent is idle, i.e.

L

LF - Static variable in class org.michailov.async.io.LineAsyncOptions
The LF char ( ).
LineAsyncOptions - Class in org.michailov.async.io
Options that control the execution of async line splitting and ending.
LineAsyncOptions() - Constructor for class org.michailov.async.io.LineAsyncOptions
 
lineBreak - Variable in class org.michailov.async.io.LineAsyncOptions
Sequence of chars that gets appended to each line.
Logger - Class in org.michailov.async
Logger customized for the needs of this project.

O

org.michailov.async - package org.michailov.async
 
org.michailov.async.io - package org.michailov.async.io
 

P

peek(int) - Method in class org.michailov.async.io.ByteRingBuffer
Gets the byte at a given relative position ahead of the current virtual read position.
peek(int) - Method in class org.michailov.async.io.CharRingBuffer
Gets the char at a given relative position ahead of the current virtual read position.
peek(int) - Method in class org.michailov.async.io.StringRingBuffer
Gets the String at a given relative position ahead of the current virtual read position.

R

read() - Method in class org.michailov.async.io.ByteRingBuffer
Reads the byte at the virtual read position, and advances the virtual read position by 1.
read() - Method in class org.michailov.async.io.CharRingBuffer
Reads the char at the virtual read position, and advances the virtual read position by 1.
read() - Method in class org.michailov.async.io.EOFInputStream
 
read(byte[], int, int) - Method in class org.michailov.async.io.EOFInputStream
 
read() - Method in class org.michailov.async.io.StringRingBuffer
Reads the String at the virtual read position, and advances the virtual read position by 1.
ready() - Method in class org.michailov.async.AsyncAgent
ready() - Method in class org.michailov.async.io.AsyncByteStreamReader
"ready" predicate that returns true when bytes can be read from the stream and written to the ring buffer without blocking.
ready() - Method in class org.michailov.async.io.AsyncByteStreamWriter
"ready" predicate that returns true when bytes can be read from the ring buffer without blocking.
ready() - Method in class org.michailov.async.io.AsyncCharDecoder
"ready" predicate that returns true when bytes can be read from the input byte ring buffer and chars can be written to the output char ring buffer without blocking.
ready() - Method in class org.michailov.async.io.AsyncCharEncoder
"ready" predicate that returns true when chars can be read from the input char ring buffer and bytes can be written to the output byte ring buffer without blocking.
ready() - Method in class org.michailov.async.io.AsyncLineJoiner
"ready" predicate that returns true when lines can be read from the input string ring buffer and chars can be written to the output char ring buffer without blocking.
ready() - Method in class org.michailov.async.io.AsyncLineSplitter
"ready" predicate that returns true when chars can be read from the input char ring buffer and lines can be written to the output string ring buffer without blocking.
ready() - Method in class org.michailov.async.io.AsyncRingBufferWatcher
"ready" predicate that returns true when items can be read from the watched ring buffer.
ready() - Method in class org.michailov.async.io.AsyncTextStreamReader
"ready" predicate that returns true when lines can be read from the string ring buffer.
ready() - Method in class org.michailov.async.io.AsyncTextStreamWriter
"ready" predicate that returns true when lines can be written to the string ring buffer.
RingBuffer - Class in org.michailov.async.io
This class defines an abstract ring buffer functionality where a virtual read position and a virtual write position chase each other around a buffer length.
RingBuffer(int) - Constructor for class org.michailov.async.io.RingBuffer
Constructor to be called from concrete implementations.

S

setEOF() - Method in class org.michailov.async.io.RingBuffer
Sets the EOF state of this ring buffer.
setIdle() - Method in class org.michailov.async.AsyncAgent
Marks this agent as 'idle'.
setIdleAndThrow(Throwable) - Method in class org.michailov.async.AsyncAgent
Throws an AsyncException to notify the WhenReady framework that something has gone wrong.
startApplyLoopAsync() - Method in class org.michailov.async.AsyncAgent
startApplyLoopAsync(Predicate<S>, Predicate<S>, Function<S, R>, S) - Static method in class org.michailov.async.WhenReady
Returns a future that represents a loop of continuations of completeAsync(java.util.function.Predicate<S>, R, S) that execute action.
startApplyLoopAsync(Predicate<S>, Predicate<S>, Function<S, R>, S, AsyncOptions) - Static method in class org.michailov.async.WhenReady
Returns a future that represents a loop of continuations of completeAsync(java.util.function.Predicate<S>, R, S) that execute action.
StringRingBuffer - Class in org.michailov.async.io
This is a concrete implementation of RingBuffer of a String[].
StringRingBuffer(int) - Constructor for class org.michailov.async.io.StringRingBuffer
Constructs a ring buffer over an implicitly allocated String[].
StringRingBuffer(String[]) - Constructor for class org.michailov.async.io.StringRingBuffer
Constructs a ring buffer over an existing String[].
stringRingBufferCapacity - Variable in class org.michailov.async.io.TextStreamAsyncOptions
Capacity of the implicit StringRingBuffer used for storing lines.
SYSTEM - Static variable in class org.michailov.async.io.LineAsyncOptions
The system-specific value.

T

TextStreamAsyncOptions - Class in org.michailov.async.io
Options that control the execution of async text stream operations.
TextStreamAsyncOptions() - Constructor for class org.michailov.async.io.TextStreamAsyncOptions
 
timeout - Variable in class org.michailov.async.AsyncOptions
Number of time units before which a given async call should complete.
TIMEOUT_INFINITE - Static variable in class org.michailov.async.AsyncOptions
Sentinel that represents an infinite number of time units.
timeUnit - Variable in class org.michailov.async.AsyncOptions
Unit type of the timeout.

W

WhenReady - Class in org.michailov.async
This class enables async processing of sync APIs.
write(byte) - Method in class org.michailov.async.io.ByteRingBuffer
Writes a byte at the virtual write position, and advances the virtual write position by 1.
write(char) - Method in class org.michailov.async.io.CharRingBuffer
Writes a char at the virtual write position, and advances the virtual write position by 1.
write(String) - Method in class org.michailov.async.io.StringRingBuffer
Writes a String at the virtual write position, and advances the virtual write position by 1.
A B C D E F G I L O P R S T W 
Skip navigation links