|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<SrvMonDisruptorWaitStrategy>
com.neeve.server.mon.SrvMonDisruptorWaitStrategy
@Generated(value="com.neeve.adm.AdmEnumeration", date="Wed Mar 28 10:54:31 EDT 2018") public enum SrvMonDisruptorWaitStrategy
The strategy used by a disruptors EventProcessor to wait for new events to process.
Enum Constant Summary | |
---|---|
Blocking
Blocking strategy that uses a lock and condition variable. |
|
BusySpin
Busy Spin strategy that uses a busy spin loop. |
|
Sleeping
Sleeping strategy that initially spins, then uses a Thread.yield(), and eventually for the minimum number of nanos the OS and JVM will allow. |
|
Unknown
Indicates the claim strategy in use is invalid or not recognized |
|
Yielding
Yielding strategy that uses a Thread.yield() after an initially spinning. |
Field Summary | |
---|---|
static SrvMonDisruptorWaitStrategy[] |
EMPTY_ARRAY
A preallocated empty array used to avoid garbage when returning empty arrays. |
int |
val
|
static List<SrvMonDisruptorWaitStrategy> |
VALUES
A zero garbage alternative to values() . |
Method Summary | |
---|---|
static SrvMonDisruptorWaitStrategy |
fromCode(int code)
Gets the value corresponding to the provided int 'code' value. |
static SrvMonDisruptorWaitStrategy |
fromCodeString(String value)
Gets the value corresponding to the provided 'code' value in its String form. |
static SrvMonDisruptorWaitStrategy |
fromValue(int val)
Gets the value corresponding to the provided 'constant' value. |
String |
getCodeString()
Gets the code value for this enumeration as a String. |
static Class<?> |
getCodeType()
Gets the code type with which this enumeration was generated. |
static boolean |
hasValue(int val)
Tests if the passed in value represents a 'constant' in this enumeration. |
static SrvMonDisruptorWaitStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static SrvMonDisruptorWaitStrategy[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final SrvMonDisruptorWaitStrategy Blocking
This strategy should be used when CPU resources are more important that latency or throughput.
public static final SrvMonDisruptorWaitStrategy Sleeping
This strategy is a good compromise between performance and CPU resource. Latency spikes can occur after quiet periods.
public static final SrvMonDisruptorWaitStrategy Yielding
This strategy is a good compromise between performance and CPU resource without incurring significant latency spikes.
public static final SrvMonDisruptorWaitStrategy BusySpin
This strategy will use CPU resource to avoid syscalls which can introduce latency jitter. It is best used when threads can be bound to specific CPU cores and is appropriate for low latency or throughput intensive apps for which there are sufficient CPU cores.
public static final SrvMonDisruptorWaitStrategy Unknown
Field Detail |
---|
public static final List<SrvMonDisruptorWaitStrategy> VALUES
values()
.
public static final SrvMonDisruptorWaitStrategy[] EMPTY_ARRAY
public final int val
Method Detail |
---|
public static SrvMonDisruptorWaitStrategy[] values()
for (SrvMonDisruptorWaitStrategy c : SrvMonDisruptorWaitStrategy.values()) System.out.println(c);
public static SrvMonDisruptorWaitStrategy valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic static final boolean hasValue(int val)
val
- The value to test for.
public static final SrvMonDisruptorWaitStrategy fromValue(int val)
val
- The 'constant' value to look up.
IllegalArgumentException
- if the provided code is not a valid code for this enumpublic static final SrvMonDisruptorWaitStrategy fromCode(int code)
code
- The int 'code' value to look up.
IllegalArgumentException
- if the provided code is not a valid code for this enumpublic static final SrvMonDisruptorWaitStrategy fromCodeString(String value)
value
- The String 'code' value to look up.
IllegalArgumentException
- if the provided code is not a valid code for this enumpublic static final Class<?> getCodeType()
public final String getCodeString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |