@PublicEvolving public enum InputStatus extends Enum<InputStatus>
InputStatus
indicates the availability of data from an asynchronous input. When asking
an asynchronous input to produce data, it returns this status to indicate how to proceed.
When the input returns NOTHING_AVAILABLE
it means that no data is
available at this time, but more will (most likely) be available in the future. The asynchronous
input will typically offer to register a Notifier or to obtain a Future that will
signal the availability of new data.
When the input returns MORE_AVAILABLE
, it can be immediately asked again
to produce more data. That readers from the asynchronous input can bypass subscribing to a
Notifier or a Future for efficiency.
When the input returns END_OF_INPUT
, then no data will be available again
from this input. It has reached the end of its bounded data.
Enum Constant and Description |
---|
END_OF_INPUT
Indicator that the input has reached the end of data.
|
MORE_AVAILABLE
Indicator that more data is available and the input can be called immediately again to
produce more data.
|
NOTHING_AVAILABLE
Indicator that no data is currently available, but more data will be available in the future
again.
|
Modifier and Type | Method and Description |
---|---|
static InputStatus |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static InputStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final InputStatus MORE_AVAILABLE
public static final InputStatus NOTHING_AVAILABLE
public static final InputStatus END_OF_INPUT
public static InputStatus[] values()
for (InputStatus c : InputStatus.values()) System.out.println(c);
public static InputStatus valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.