public final class MediaDriver extends Object implements AutoCloseable
Usage:
$ java -jar aeron-driver.jar
$ java -Doption=value -jar aeron-driver.jar
Configuration
Modifier and Type | Class and Description |
---|---|
static class |
MediaDriver.Context
Context for the
MediaDriver that can be used to provide overrides for Configuration . |
Modifier and Type | Method and Description |
---|---|
String |
aeronDirectoryName()
Used to access the configured aeronDirectoryName for this MediaDriver, typically used after the
launchEmbedded() method is used. |
void |
close()
Shutdown the media driver by stopping all threads and freeing resources.
|
MediaDriver.Context |
context()
Get the
MediaDriver.Context that is used by this MediaDriver . |
static MediaDriver |
launch()
Launch a MediaDriver embedded in the current process with default configuration.
|
static MediaDriver |
launch(MediaDriver.Context ctx)
Launch a MediaDriver embedded in the current process and provided a configuration ctx.
|
static MediaDriver |
launchEmbedded()
Launch an isolated MediaDriver embedded in the current process with a generated aeronDirectoryName that can be
retrieved by calling aeronDirectoryName.
|
static MediaDriver |
launchEmbedded(MediaDriver.Context ctx)
Launch an isolated MediaDriver embedded in the current process with a provided configuration ctx and a generated
aeronDirectoryName (overwrites configured
CommonContext.aeronDirectoryName() ) that can be retrieved by calling
aeronDirectoryName. |
static void |
main(String[] args)
Main method for launching the process.
|
AgentInvoker |
sharedAgentInvoker()
Get the
AgentInvoker for the shared agents when running without threads. |
public static void main(String[] args)
args
- passed to the process.public static MediaDriver launchEmbedded()
If the aeronDirectoryName is set as a system property to something different than
CommonContext.AERON_DIR_PROP_DEFAULT
then this set value will be used.
public static MediaDriver launchEmbedded(MediaDriver.Context ctx)
CommonContext.aeronDirectoryName()
) that can be retrieved by calling
aeronDirectoryName.
If the aeronDirectoryName is set as a system property, or via context, to something different than
CommonContext.AERON_DIR_PROP_DEFAULT
then this set value will be used.
ctx
- containing the configuration options.public static MediaDriver launch()
public static MediaDriver launch(MediaDriver.Context ctx)
ctx
- containing the configuration options.public MediaDriver.Context context()
MediaDriver.Context
that is used by this MediaDriver
.MediaDriver.Context
that is used by this MediaDriver
.public AgentInvoker sharedAgentInvoker()
AgentInvoker
for the shared agents when running without threads.AgentInvoker
for the shared agents when running without threads.public void close()
close
in interface AutoCloseable
public String aeronDirectoryName()
launchEmbedded()
method is used.Copyright © 2014-2021 Real Logic Limited. All Rights Reserved.