Package io.aeron
Class Aeron.Configuration
java.lang.Object
io.aeron.Aeron.Configuration
- Enclosing class:
- Aeron
Configuration options for the
Aeron client.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSystem property to name Aeron client.static final longDefault duration to linger on close so that publishers subscribers have time to notice closed resources.static final StringDuration to linger on close so that publishers subscribers have time to notice closed resources.static final ErrorHandlerThe Default handler for Aeron runtime exceptions.static final StringDuration to sleep when idle.static final intLimit to the number of characters allowed in the client name.static final booleanDefault for if a memory-mapped filed should be pre-touched to fault it into a process.static final StringShould memory-mapped files be pre-touched so that they are already faulted into a process.static final longDefault duration a resource should linger before deletion.static final StringDuration to wait while lingering an entity such as anImagebefore deleting underlying resources such as memory mapped files. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet the configured client name.static longDuration to wait while lingering an entity such as anImagebefore deleting underlying resources such as memory mapped files.static longDuration in nanoseconds for which the client conductor will sleep between work cycles when idle.static booleanShould memory-mapped files be pre-touched so that they are already faulted into a process.static longDuration to wait while lingering an entity such as anImagebefore deleting underlying resources such as memory mapped files.
-
Field Details
-
IDLE_SLEEP_DURATION_PROP_NAME
Duration to sleep when idle.- See Also:
-
RESOURCE_LINGER_DURATION_PROP_NAME
Duration to wait while lingering an entity such as anImagebefore deleting underlying resources such as memory mapped files.- See Also:
-
RESOURCE_LINGER_DURATION_DEFAULT_NS
public static final long RESOURCE_LINGER_DURATION_DEFAULT_NSDefault duration a resource should linger before deletion. -
CLOSE_LINGER_DURATION_PROP_NAME
Duration to linger on close so that publishers subscribers have time to notice closed resources. This value can be set to a few seconds if the application is likely to experience CPU starvation or long GC pauses.- See Also:
-
CLOSE_LINGER_DURATION_DEFAULT_NS
public static final long CLOSE_LINGER_DURATION_DEFAULT_NSDefault duration to linger on close so that publishers subscribers have time to notice closed resources.- See Also:
-
PRE_TOUCH_MAPPED_MEMORY_PROP_NAME
Should memory-mapped files be pre-touched so that they are already faulted into a process.Pre-touching files can result in it taking longer for resources to become available in return for avoiding later pauses due to page faults.
- See Also:
-
PRE_TOUCH_MAPPED_MEMORY_DEFAULT
public static final boolean PRE_TOUCH_MAPPED_MEMORY_DEFAULTDefault for if a memory-mapped filed should be pre-touched to fault it into a process.- See Also:
-
CLIENT_NAME_PROP_NAME
System property to name Aeron client. Default to empty string.- Since:
- 1.44.0
- See Also:
-
DEFAULT_ERROR_HANDLER
The Default handler for Aeron runtime exceptions. When aDriverTimeoutExceptionis encountered, this handler will exit the program.The error handler can be overridden by supplying an
Aeron.Contextwith a custom handler.- See Also:
-
MAX_CLIENT_NAME_LENGTH
public static final int MAX_CLIENT_NAME_LENGTHLimit to the number of characters allowed in the client name.- See Also:
-
-
Constructor Details
-
Configuration
public Configuration()
-
-
Method Details
-
idleSleepDurationNs
public static long idleSleepDurationNs()Duration in nanoseconds for which the client conductor will sleep between work cycles when idle.- Returns:
- duration in nanoseconds to wait when idle in client conductor.
- See Also:
-
resourceLingerDurationNs
public static long resourceLingerDurationNs()Duration to wait while lingering an entity such as anImagebefore deleting underlying resources such as memory mapped files.- Returns:
- duration in nanoseconds to wait before deleting an expired resource.
- See Also:
-
closeLingerDurationNs
public static long closeLingerDurationNs()Duration to wait while lingering an entity such as anImagebefore deleting underlying resources such as memory mapped files.- Returns:
- duration in nanoseconds to wait before deleting an expired resource.
- See Also:
-
preTouchMappedMemory
public static boolean preTouchMappedMemory()Should memory-mapped files be pre-touched so that they are already faulted into a process.- Returns:
- true if memory mappings should be pre-touched, otherwise false.
- See Also:
-
clientName
Get the configured client name.- Returns:
- specified client name or empty string if not set.
- See Also:
-