public class UtlConstants extends Object
This class IS supported for use by end users.
| Modifier and Type | Field and Description |
|---|---|
static int |
BYTE_SIZE_IN_BYTES
The size of a
Byte in bytes |
static int |
CHAR_SIZE_IN_BYTES
The size of a
Character in bytes |
static int |
DOUBLE_SIZE_IN_BYTES
The size of a
Double in bytes |
static boolean |
FILE_USENATIVE_DEFAULT
The default value for
FILE_USENATIVE_PROPNAME ("nv.file.usenative"): true. |
static String |
FILE_USENATIVE_PROPNAME
Property that controls whether file io uses Rumi native libraries (if available).
|
static int |
FLOAT_SIZE_IN_BYTES
The size of a
Float in bytes |
static int |
INT_SIZE_IN_BYTES
The size of a
Integer in bytes |
static int |
LONG_SIZE_IN_BYTES
The size of a
Long in bytes |
static String |
POOL_DETACHEDWASH_CPUAFFINITIYMASK_PROPNAME
Property that controls the cpu affinitiy mask of the detached pool washer when enabled.
|
static boolean |
POOL_DETACHEDWASH_DEFAULT
The default value for
POOL_DETACHEDWASH_PROPNAME ("nv.pool.detachedwash"): false. |
static String |
POOL_DETACHEDWASH_PROPNAME
Property that controls whether objects returned to a pool a washed in a detached thread.
|
static int |
POOL_DETACHEDWASH_QUEUEDEPTH_DEFAULT
The default value for
POOL_DETACHEDWASH_QUEUEDEPTH_PROPNAME ("nv.pool.detachedwash.queueDepth"): 1024. |
static String |
POOL_DETACHEDWASH_QUEUEDEPTH_PROPNAME
Property that controls the queue depth of the detached pool washer when enabled.
|
static String |
POOL_DETACHEDWASH_WAITSTRATEGY_DEFAULT
The default value for
POOL_DETACHEDWASH_WAITSTRATEGY_PROPNAME ("nv.pool.detachedwash.waitstrategy"): "Blocking". |
static String |
POOL_DETACHEDWASH_WAITSTRATEGY_PROPNAME
Property that controls the wait strategy for the detached pool washer thread when enabled.
|
static boolean |
POOL_LEAKTRACKING_ENABLED_DEFAULT
The default value for
POOL_LEAKTRACKING_ENABLED_PROPNAME ("nv.tuning.memory.pool.leaktracking.enabled"): false. |
static String |
POOL_LEAKTRACKING_ENABLED_PROPNAME
Property that controls whether pool leak tracking is enabled.
|
static String |
POOL_LEAKTRACKING_ENABLED_TYPES_DEFAULT
The default value for
POOL_LEAKTRACKING_ENABLED_PROPNAME ("nv.tuning.memory.pool.leaktracking.enabled"): false (none). |
static String |
POOL_LEAKTRACKING_ENABLED_TYPES_PROPNAME
Property that can be used to selective enable pool leak tracking for specific types.
|
static int |
POOL_LEAKTRACKING_HISTORYSIZE_DEFAULT
The default value for
POOL_LEAKTRACKING_HISTORYSIZE_PROPNAME ("nv.tuning.memory.pool.leaktracking.historySize"): 100. |
static String |
POOL_LEAKTRACKING_HISTORYSIZE_PROPNAME
Property that controls the number of pool misses that are retained for diagnosing pool leaks.
|
static int |
POOL_LEAKTRACKING_TRIGGER_THRESHOLD_DEFAULT
The default value for
POOL_LEAKTRACKING_HISTORYSIZE_PROPNAME ("nv.tuning.memory.pool.leaktracking.triggerThreshold"): 100000. |
static String |
POOL_LEAKTRACKING_TRIGGER_THRESHOLD_PROPNAME
Property that controls the trigger threshold on which to dump pool leaks.
|
static String |
POOL_LOCKINGSTRATEGY_DEFAULT
The default value for
POOL_LOCKINGSTRATEGY_PROPNAME ("nv.tuning.performance.pool.lockingstrategy"): "Mutex". |
static String |
POOL_LOCKINGSTRATEGY_PROPNAME
Property that controls the locking strategy to use for threaded pools.
|
static boolean |
POOL_OVERRIDE_PARAMS_FROM_ENV_DEFAULT
The default value for
POOL_OVERRIDE_PARAMS_FROM_ENV_PROPNAME ("nv.tuning.memory.pool.overrideparamsfromenv"): false. |
static String |
POOL_OVERRIDE_PARAMS_FROM_ENV_PROPNAME
Property that controls whether pool parameters can be overridden from the environment.
|
static boolean |
POOL_SHOULD_POOL_DEFAULT
The default value for
POOL_SHOULD_POOL_PROPNAME ("nv.tuning.memory.pool.shouldpool"): true. |
static String |
POOL_SHOULD_POOL_PROPNAME
Property that controls whether pool is enabled.
|
static boolean |
POOL_SOURCE_PARAMS_FROM_ENV_DEFAULT
The default value for
POOL_SOURCE_PARAMS_FROM_ENV_PROPNAME ("nv.tuning.memory.pool.sourceparamsfromenv"): true. |
static String |
POOL_SOURCE_PARAMS_FROM_ENV_PROPNAME
Property that controls whether pool parameters can be sourced from the environment.
|
static boolean |
REFTRACKING_ENABLED_DEFAULT
The default value for
REFTRACKING_ENABLED_PROPNAME ("nv.reftracking.enabled"): false. |
static String |
REFTRACKING_ENABLED_PROPNAME
Globally enables reference tracking for pooled objects.
|
static int |
REFTRACKING_HISTORYSIZE_DEFAULT
The default value for
REFTRACKING_HISTORYSIZE_PROPNAME ("nv.reftracking.historysize"): 5 (none). |
static String |
REFTRACKING_HISTORYSIZE_PROPNAME
Property that controls the history size to maintain for reference tracked pool items.
|
static String |
REFTRACKING_TYPES_DEFAULT
The default value for
REFTRACKING_TYPES_PROPNAME ("nv.reftracking.types"): null (none). |
static String |
REFTRACKING_TYPES_PROPNAME
Enables reference tracking for specific types of pooled elements
Enabling reference tracking captures and stores stack traces on acquire
and dispose of pooled objects.
|
static int |
SHORT_SIZE_IN_BYTES
The size of a
Short in bytes |
static String |
THREAD_DEFAULTCPUAFFINITYMASK_DEFAULT
The default value for
THREAD_DEFAULTCPUAFFINITYMASK_PROPNAME ("nv.tuning.cpu.defaultaffinitymask"): "0". |
static String |
THREAD_DEFAULTCPUAFFINITYMASK_PROPNAME
Property that controls the default affinity mask set by
UtlThread.setDefaultCPUAffinityMask(). |
static boolean |
THREAD_ENABLECPUAFFINITYMASKS_DEFAULT
The default value for
THREAD_ENABLECPUAFFINITYMASKS_PROPNAME ("nv.tuning.cpu.enableaffinitymasks"): false. |
static String |
THREAD_ENABLECPUAFFINITYMASKS_PROPNAME
Property that controls whether or not thread cpu affinitization is enabled.
|
static String |
THREAD_WAIT_STATS_ENABLE
Property that controls whether or not thread spin loop stats are enabled.
|
static boolean |
THREAD_WAIT_STATS_ENABLE_DEFAULT
The default value for
THREAD_WAIT_STATS_ENABLE ("nv.threadwaitstatsenabled"): true. |
static String |
TIME_FORMAT_DEFAULT
The default value for
TIME_FORMAT_PROPNAME ("nv.time.format"): "yyyyMMdd-HH:mm:ss.SSS". |
static String |
TIME_FORMAT_PROPNAME
Property that controls default format for timestamps.
|
static String |
TIME_TIMEZONEFORMAT_DEFAULT
The default value for
TIME_TIMEZONEFORMAT_PROPNAME ("nv.time.timezoneformat"): "GMT". |
static String |
TIME_TIMEZONEFORMAT_PROPNAME
Property that controls default timezone used for formatting timestamps.
|
static boolean |
TIME_USENATIVE_DEFAULT
The default value for
TIME_USENATIVE_PROPNAME ("nv.time.usenative"): false. |
static String |
TIME_USENATIVE_PROPNAME
Property that controls whether
UtlTime.now() uses native libraries to obtain current time. |
| Constructor and Description |
|---|
UtlConstants() |
public static final String TIME_USENATIVE_PROPNAME
UtlTime.now() uses native libraries to obtain current time.
Property Name: "nv.time.usenative"
Default value: false
public static final boolean TIME_USENATIVE_DEFAULT
TIME_USENATIVE_PROPNAME ("nv.time.usenative"): false.public static final String TIME_FORMAT_PROPNAME
Controls the default output format of timestamps formatted via UtlTime.format(Date).
This format will be used until UtlTime.setTimestampFormat(String) changes it.
The value supplied must be a format that can be parsed by the SimpleDateFormat(String)
constructor.
Property Name: "nv.time.format"
Default value: "yyyyMMdd-HH:mm:ss.SSS"
public static final String TIME_FORMAT_DEFAULT
TIME_FORMAT_PROPNAME ("nv.time.format"): "yyyyMMdd-HH:mm:ss.SSS".public static final String TIME_TIMEZONEFORMAT_PROPNAME
Controls the default format of timezones formatted via UtlTime.format(Date).
This format will be used until UtlTime.setTimestampFormatTimeZone(String)
or UtlTime.setTimestampFormatTimeZone(TimeZone) changes it.
The value supplied must be a format that can be parsed by the DateFormat.setTimeZone(TimeZone).
Property Name: "nv.time.timezoneformat"
Default value: "GMT"
public static final String TIME_TIMEZONEFORMAT_DEFAULT
TIME_TIMEZONEFORMAT_PROPNAME ("nv.time.timezoneformat"): "GMT".public static final String FILE_USENATIVE_PROPNAME
Property Name: "nv.file.usenative"
Default value: true
public static final boolean FILE_USENATIVE_DEFAULT
FILE_USENATIVE_PROPNAME ("nv.file.usenative"): true.public static final String POOL_SHOULD_POOL_PROPNAME
This property can be used to globally enable or disable pools. Globally disabling pools is not usually recommended as it can have adverse consequences on memory management in the platform. This property is mainly provided for troubleshooting purposes.
Property Name: "nv.tuning.memory.pool.shouldpool"
Default value: true
public static final boolean POOL_SHOULD_POOL_DEFAULT
POOL_SHOULD_POOL_PROPNAME ("nv.tuning.memory.pool.shouldpool"): true.public static final String POOL_LOCKINGSTRATEGY_PROPNAME
The value provided must be one of UtlPool.LockingStrategy, case sensitive.
Property Name: "nv.tuning.performance.pool.lockingstrategy"
Default value: "Mutex"
public static final String POOL_LOCKINGSTRATEGY_DEFAULT
POOL_LOCKINGSTRATEGY_PROPNAME ("nv.tuning.performance.pool.lockingstrategy"): "Mutex".public static final String POOL_LEAKTRACKING_ENABLED_PROPNAME
Pool leak tracking can be enabled as a diagnostic measure that records stack traces as items are taken and returned to a pool. When enabled and a given number of pool misses occur that cause a new item to be allocated, a history of recent items taken from the pool is dumped which can be used to determine what points in the code is causing the allocations.
Most often it is helpful to additionally enable reference tracking on
the object. When reference tracking is enabled for an item that is leaking from a pool, the reference
history for the item is displayed along with the pool leak history. This allows one to see what caused
item historically take from the pool not to be disposed and returned to the pool.
Related Properties
POOL_LEAKTRACKING_ENABLED_TYPES_PROPNAME - can be used to enable pool leak tracking on a type by type basis (to reduce overhead)
POOL_LEAKTRACKING_HISTORYSIZE_DEFAULT - can be used to control the size of the history maintained when a dump is triggered.
POOL_LEAKTRACKING_TRIGGER_THRESHOLD_PROPNAME - can be used to control the threshold of misses on which to trigger a dump.
POOL_LEAKTRACKING_ENABLED_TYPES_PROPNAME,
but it may also be necessary to reduce the throughput of the application to collect meaningful results
This property must be set as a system property on the jvm command line
Property Name: "nv.tuning.memory.pool.leaktracking.enabled"
Default value: false
public static final boolean POOL_LEAKTRACKING_ENABLED_DEFAULT
POOL_LEAKTRACKING_ENABLED_PROPNAME ("nv.tuning.memory.pool.leaktracking.enabled"): false.public static final String POOL_LEAKTRACKING_ENABLED_TYPES_PROPNAME
While POOL_LEAKTRACKING_ENABLED_PROPNAME enables pool leak tracking for all pools, this
property configures pool leak tracking for a specific types.
Usage
-Dnv.pool.leaktracking.types=fullyQualifiedClass1|fullyQualifiedClassN
Specifying:
-Dnv.pool.leaktracking.types=*enables pool leak tracking for all types.
Related Properties
POOL_LEAKTRACKING_ENABLED_TYPES_PROPNAME - can be used to enable pool leak tracking on a type by type basis (to reduce overhead)
POOL_LEAKTRACKING_HISTORYSIZE_DEFAULT - can be used to control the size of the history maintained when a dump is triggered.
POOL_LEAKTRACKING_TRIGGER_THRESHOLD_PROPNAME - can be used to control the threshold of misses on which to trigger a dump.
This property must be set as a system property on the jvm command line
Property Name: "nv.tuning.memory.pool.leaktracking.types"
Default value: "nv.tuning.memory.pool.leaktracking.types"
public static final String POOL_LEAKTRACKING_ENABLED_TYPES_DEFAULT
POOL_LEAKTRACKING_ENABLED_PROPNAME ("nv.tuning.memory.pool.leaktracking.enabled"): false (none).public static final String POOL_LEAKTRACKING_HISTORYSIZE_PROPNAME
If the throughput of pool misses is high increasing this value will show older misses in the diagnostic dump which may be necessary to diagnose problematic pool misses.
This property must be set as a system property on the jvm command line
Property Name: "nv.tuning.memory.pool.leaktracking.historySize"
Default value: 100
public static final int POOL_LEAKTRACKING_HISTORYSIZE_DEFAULT
POOL_LEAKTRACKING_HISTORYSIZE_PROPNAME ("nv.tuning.memory.pool.leaktracking.historySize"): 100.public static final String POOL_LEAKTRACKING_TRIGGER_THRESHOLD_PROPNAME
Decreasing this value is useful to trigger a pool leak dump faster, but choosing a value too low can trigger the dump too early in the case where the size of a healthy pool is dynamically stabilizing. For example, if pool items are held outside of the pool for a relatively long time prior to be returned a large number of pool misses initially is okay while the pool grows to size.
This property must be set as a system property on the jvm command line
Property Name: "nv.tuning.memory.pool.leaktracking.triggerThreshold"
Default value: 100000
public static final int POOL_LEAKTRACKING_TRIGGER_THRESHOLD_DEFAULT
POOL_LEAKTRACKING_HISTORYSIZE_PROPNAME ("nv.tuning.memory.pool.leaktracking.triggerThreshold"): 100000.public static final String POOL_DETACHEDWASH_PROPNAME
When a pool item is returned to its pool its init() method is called
to clean up the item for reuse. By default this is done by the thread that is returning the
Item to the pool. Enabling a detached wash thread allows the item cleanup to be done on a
separate thread which can improve latency for the thread returning the Item.
Property Name: "nv.pool.detachedwash"
Default value: false
public static final boolean POOL_DETACHEDWASH_DEFAULT
POOL_DETACHEDWASH_PROPNAME ("nv.pool.detachedwash"): false.public static final String POOL_DETACHEDWASH_CPUAFFINITIYMASK_PROPNAME
public static final String POOL_DETACHEDWASH_QUEUEDEPTH_PROPNAME
public static final int POOL_DETACHEDWASH_QUEUEDEPTH_DEFAULT
POOL_DETACHEDWASH_QUEUEDEPTH_PROPNAME ("nv.pool.detachedwash.queueDepth"): 1024.public static final String POOL_DETACHEDWASH_WAITSTRATEGY_PROPNAME
public static final String POOL_DETACHEDWASH_WAITSTRATEGY_DEFAULT
POOL_DETACHEDWASH_WAITSTRATEGY_PROPNAME ("nv.pool.detachedwash.waitstrategy"): "Blocking".public static final String POOL_SOURCE_PARAMS_FROM_ENV_PROPNAME
When true calls to create pools will result in Params.load(poolkey, UtlEnv.getProps(), false being
invoked to apply pool parameters that haven't already been set explicitly. To override programmatically set values
see POOL_OVERRIDE_PARAMS_FROM_ENV_PROPNAME.
This setting is currently classified as experimental. It and its semantics is subject to change.
Property Name: "nv.tuning.memory.pool.sourceparamsfromenv"
Default value: true
public static final boolean POOL_SOURCE_PARAMS_FROM_ENV_DEFAULT
POOL_SOURCE_PARAMS_FROM_ENV_PROPNAME ("nv.tuning.memory.pool.sourceparamsfromenv"): true.public static final String POOL_OVERRIDE_PARAMS_FROM_ENV_PROPNAME
By default when pool parameters are sourced from the environment, they will not override values explicitly set programmatically or from other property sources. Setting this property forces the environment specified values to take precedence.
This property should be used with extreme care as overriding programmatically set pool parameters can have adverse effects.
This property takes no effect if UtlConstants#POOL_SOURCE_PARAMS_FROM_ENV is disabled.
This setting is currently classified as experimental. It and its semantics is subject to change.
Property Name: "nv.tuning.memory.pool.overrideparamsfromenv"
Default value: false
public static final boolean POOL_OVERRIDE_PARAMS_FROM_ENV_DEFAULT
POOL_OVERRIDE_PARAMS_FROM_ENV_PROPNAME ("nv.tuning.memory.pool.overrideparamsfromenv"): false.public static final String REFTRACKING_ENABLED_PROPNAME
Enabling reference tracking captures and stores stack traces on acquire and dispose of pooled objects. Reference tracking can be enabled to diagnose reference counting errors caused by attempts to acquire or dispose an already disposed object. When enabled the reference tracking history for the object when such an error is detected.
Reference tracking can also be enabled to help diagnose pool leaks when
POOL_LEAKTRACKING_ENABLED_PROPNAME is enabled in which case the
reference history for items recently taken from a pool can be dumped to
show what code has acquire but not disposed of a pool item.
WARNING: Reference tracking has very high overhead. It is intended only for
use in a diagnostic scenarios and should never be enabled for production. The overhead
of enabling reference tracking can be mitigated by using REFTRACKING_TYPES_PROPNAME,
but it may also be necessary to reduce the throughput of the application to
collect meaningful results.
This property must be set as a system property on the jvm command line
Property Name: "nv.reftracking.enabled"
Default value: false
public static final boolean REFTRACKING_ENABLED_DEFAULT
REFTRACKING_ENABLED_PROPNAME ("nv.reftracking.enabled"): false.public static final String REFTRACKING_TYPES_PROPNAME
Enabling reference tracking captures and stores stack traces on acquire and dispose of pooled objects. Reference tracking can be enabled to diagnose reference counting errors caused by attempts to acquire or dispose an already disposed object. When enabled the reference tracking history for the object when such an error is detected.
Reference tracking can also be enabled to help diagnose pool leaks when
POOL_LEAKTRACKING_ENABLED_PROPNAME is enabled in which case the
reference history for items recently taken from a pool can be dumped to
show what code has acquire but not disposed of a pool item.
Usage
-Dnv.reftracking.types=fullyQualifiedClass1|fullyQualifiedClassNSpecifying:
-Dnv.reftracking.types=*enables pool leak tracking for all types. WARNING: Reference tracking has very high overhead. It is intended only for use in a diagnostic scenarios and should never be enabled for production. It may be necessary to reduce the throughput of the application to collect meaningful results.
This property must be set as a system property on the jvm command line
Property Name: "nv.reftracking.types"
Default value: REFTRACKING_TYPES_DEFAULT (none)
public static final String REFTRACKING_TYPES_DEFAULT
REFTRACKING_TYPES_PROPNAME ("nv.reftracking.types"): null (none).public static final String REFTRACKING_HISTORYSIZE_PROPNAME
When reference tracking is enabled for a type, this property controls the number of previous incarnations of the item through the pool to track. This is important because it is possible that when an item is returned to a pool too early and then taken back out in another incarnation, it is possible that code from the previous incarnation may be the root cause of the problem. Showing previous incarnations in which there were not pooling problems can also help to highlight code paths that are not problematic.
Reducing this value can decrease the memory overhead associate with reference tracking. Increasing this value provides more history at the cost of more memory overhead.
This property must be set as a system property on the jvm command line
Property Name: "nv.pool.detachedwash.waitstrategy"
Default value: "Blocking"
public static final int REFTRACKING_HISTORYSIZE_DEFAULT
REFTRACKING_HISTORYSIZE_PROPNAME ("nv.reftracking.historysize"): 5 (none).public static final String THREAD_ENABLECPUAFFINITYMASKS_PROPNAME
Cpu affinitization is currently only supported on linux platforms. When enabled
A calling thread can call UtlThread.setCPUAffinityMask(String) to affinitize
it to a processor core.
Property Name: "nv.tuning.cpu.enableaffinitymasks"
Default value: false
public static final boolean THREAD_ENABLECPUAFFINITYMASKS_DEFAULT
THREAD_ENABLECPUAFFINITYMASKS_PROPNAME ("nv.tuning.cpu.enableaffinitymasks"): false.public static final String THREAD_DEFAULTCPUAFFINITYMASK_PROPNAME
UtlThread.setDefaultCPUAffinityMask().
Property Name: "nv.tuning.cpu.defaultaffinitymask"
Default value: "0"
public static final String THREAD_DEFAULTCPUAFFINITYMASK_DEFAULT
THREAD_DEFAULTCPUAFFINITYMASK_PROPNAME ("nv.tuning.cpu.defaultaffinitymask"): "0".public static final String THREAD_WAIT_STATS_ENABLE
When enabled threads that support it, will record time spent busy spinning.
Property Name: "nv.threadwaitstatsenabled"
Default value: true
public static final boolean THREAD_WAIT_STATS_ENABLE_DEFAULT
THREAD_WAIT_STATS_ENABLE ("nv.threadwaitstatsenabled"): true.public static final int BYTE_SIZE_IN_BYTES
Byte in bytespublic static final int CHAR_SIZE_IN_BYTES
Character in bytespublic static final int SHORT_SIZE_IN_BYTES
Short in bytespublic static final int INT_SIZE_IN_BYTES
Integer in bytespublic static final int FLOAT_SIZE_IN_BYTES
Float in bytespublic static final int LONG_SIZE_IN_BYTES
Long in bytespublic static final int DOUBLE_SIZE_IN_BYTES
Double in bytesCopyright © 2019 N5 Technologies, Inc. All Rights Reserved.