public static enum UtlPool.LockingStrategy extends Enum<UtlPool.LockingStrategy>
Enum Constant and Description |
---|
Lock
This strateggy uses a ReentrantLock.
|
Mutex
This strategy uses a synchronized block on a mutex.
|
Spinning
This is a lock free strategy that uses spin locking.
|
Modifier and Type | Method and Description |
---|---|
static UtlPool.LockingStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static UtlPool.LockingStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final UtlPool.LockingStrategy Spinning
This strategy is zero garbage and highly efficient, but may
consume more cpu resources.
This is the default stategy when the thread cpu affinitization is enabled.
(see UtlConstants.THREAD_ENABLECPUAFFINITYMASKS_PROPNAME
public static final UtlPool.LockingStrategy Mutex
This strategy is generaly slower than Spinning
or Lock
but is zero garbage.
This is the default stategy when the thread cpu affinitization is enabled.
(see UtlConstants.THREAD_ENABLECPUAFFINITYMASKS_PROPNAME
public static final UtlPool.LockingStrategy Lock
This stategy is more efficient than using Mutex
, especially under
higher contention, but is not garbage free.
public static UtlPool.LockingStrategy[] values()
for (UtlPool.LockingStrategy c : UtlPool.LockingStrategy.values()) System.out.println(c);
public static UtlPool.LockingStrategy 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 © 2019 Neeve Research, LLC. All Rights Reserved.