- java.lang.Object
-
- java.lang.Enum<FlowModifier>
-
- swim.io.FlowModifier
-
- All Implemented Interfaces:
Serializable
,Comparable<FlowModifier>
,Debug
public enum FlowModifier extends Enum<FlowModifier> implements Debug
Network channel flow delta, modifying read and write operations. Represents an atomic change to aFlowControl
state.- See Also:
FlowControl
,FlowContext
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DISABLE_READ
read operation should be disabled; write operation should not be modified.DISABLE_READ_ENABLE_WRITE
read operation should be disabled; write operation should be enabled.DISABLE_READ_WRITE
read and write operations should be disabled.DISABLE_WRITE
write operation should be disabled; read operation should not be modified.DISABLE_WRITE_ENABLE_READ
write operation should be disabled; read operation should be enabled.ENABLE_READ
read operation should be enabled; write operation should not be modified.ENABLE_READ_WRITE
read and write operations should be enabled.ENABLE_WRITE
write operation should be enabled; read operation should not be modified.RESELECT
read and write operations should not be modified.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FlowModifier
and(FlowModifier that)
Returns theFlowModifier
with all modifications applied inthis
andthat
applied, with enable instructions taking precedence over conflicting disable instructions.<T> Output<T>
debug(Output<T> output)
Writes a developer readable, debug-formatted string representation of this object tooutput
.boolean
isReadDisabled()
Returnstrue
if the read operation should be disabled.boolean
isReadEnabled()
Returnstrue
if the read operation should be enabled.boolean
isWriteDisabled()
Returnstrue
if the write operation should be disabled.boolean
isWriteEnabled()
Returnstrue
if the write operation should be enabled.FlowModifier
not()
Returns theFlowModifier
with all applied modifications inthis
unapplied, and all unapplied operations inthis
applied, with enable instructions taking precedence over conflicting disable instructions.FlowModifier
or(FlowModifier that)
Returns theFlowModifier
with all modifications applied inthis
orthat
applied, with enable instructions taking precedence over conflicting disable instructions.static FlowModifier
valueOf(String name)
Returns the enum constant of this type with the specified name.static FlowModifier[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.FlowModifier
xor(FlowModifier that)
Returns theFlowModifier
with all modifications applied inthis
orthat
—but not both—applied, with enable instructions taking precedence over conflicting disable instructions.
-
-
-
Enum Constant Detail
-
RESELECT
public static final FlowModifier RESELECT
read and write operations should not be modified.
-
DISABLE_READ
public static final FlowModifier DISABLE_READ
read operation should be disabled; write operation should not be modified.
-
DISABLE_WRITE
public static final FlowModifier DISABLE_WRITE
write operation should be disabled; read operation should not be modified.
-
DISABLE_READ_WRITE
public static final FlowModifier DISABLE_READ_WRITE
read and write operations should be disabled.
-
ENABLE_READ
public static final FlowModifier ENABLE_READ
read operation should be enabled; write operation should not be modified.
-
DISABLE_WRITE_ENABLE_READ
public static final FlowModifier DISABLE_WRITE_ENABLE_READ
write operation should be disabled; read operation should be enabled.
-
ENABLE_WRITE
public static final FlowModifier ENABLE_WRITE
write operation should be enabled; read operation should not be modified.
-
DISABLE_READ_ENABLE_WRITE
public static final FlowModifier DISABLE_READ_ENABLE_WRITE
read operation should be disabled; write operation should be enabled.
-
ENABLE_READ_WRITE
public static final FlowModifier ENABLE_READ_WRITE
read and write operations should be enabled.
-
-
Method Detail
-
values
public static FlowModifier[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FlowModifier c : FlowModifier.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FlowModifier valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isReadDisabled
public boolean isReadDisabled()
Returnstrue
if the read operation should be disabled.
-
isWriteDisabled
public boolean isWriteDisabled()
Returnstrue
if the write operation should be disabled.
-
isReadEnabled
public boolean isReadEnabled()
Returnstrue
if the read operation should be enabled.
-
isWriteEnabled
public boolean isWriteEnabled()
Returnstrue
if the write operation should be enabled.
-
or
public FlowModifier or(FlowModifier that)
Returns theFlowModifier
with all modifications applied inthis
orthat
applied, with enable instructions taking precedence over conflicting disable instructions.
-
xor
public FlowModifier xor(FlowModifier that)
Returns theFlowModifier
with all modifications applied inthis
orthat
—but not both—applied, with enable instructions taking precedence over conflicting disable instructions.
-
and
public FlowModifier and(FlowModifier that)
Returns theFlowModifier
with all modifications applied inthis
andthat
applied, with enable instructions taking precedence over conflicting disable instructions.
-
not
public FlowModifier not()
Returns theFlowModifier
with all applied modifications inthis
unapplied, and all unapplied operations inthis
applied, with enable instructions taking precedence over conflicting disable instructions.
-
-