- All Implemented Interfaces:
Serializable
,Comparable<IoTimeout>
,java.lang.constant.Constable
,org.refcodes.mixin.TimeInMsAccessor
public enum IoTimeout extends Enum<IoTimeout> implements org.refcodes.mixin.TimeInMsAccessor
The
IoTimeout
defines values used inside a IO processing control
flow.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface org.refcodes.mixin.TimeInMsAccessor
org.refcodes.mixin.TimeInMsAccessor.TimeInMsBuilder<B extends org.refcodes.mixin.TimeInMsAccessor.TimeInMsBuilder<B>>, org.refcodes.mixin.TimeInMsAccessor.TimeInMsMutator, org.refcodes.mixin.TimeInMsAccessor.TimeInMsProperty
-
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description static int
TIMEOUT_DIVIDER
-
Method Summary
Modifier and Type Method Description int
getTimeInMs()
static long
toSenseTimeoutTimeframeInMs(long aIoTimeoutInMs)
Determines the timeout to securely sense for a given timeout.static long
toTimeoutSleepLoopTimeInMs(long aIoTimeoutInMs)
Determines the sleep time within an I/O polling timeout loop.static IoTimeout
valueOf(String name)
Returns the enum constant of this type with the specified name.static IoTimeout[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
MIN
-
NORM
-
MAX
-
-
Field Details
-
TIMEOUT_DIVIDER
public static final int TIMEOUT_DIVIDER- See Also:
- Constant Field Values
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
getTimeInMs
public int getTimeInMs()- Specified by:
getTimeInMs
in interfaceorg.refcodes.mixin.TimeInMsAccessor
-
toTimeoutSleepLoopTimeInMs
public static long toTimeoutSleepLoopTimeInMs(long aIoTimeoutInMs)Determines the sleep time within an I/O polling timeout loop.- Parameters:
aIoTimeoutInMs
- The overall I/O timeout.- Returns:
- The "recommended" loop sleep time during polling.
-
toSenseTimeoutTimeframeInMs
public static long toSenseTimeoutTimeframeInMs(long aIoTimeoutInMs)Determines the timeout to securely sense for a given timeout.- Parameters:
aIoTimeoutInMs
- The overall I/O timeout within which to sense.- Returns:
- The "recommended" timeout to securely sense within the given timeout.
-