public final class MediaDriver
extends java.lang.Object
implements java.lang.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
Configuration for the
MediaDriver that can be used to override Configuration . |
Modifier and Type | Method and Description |
---|---|
java.lang.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(java.lang.String[] args)
Start Media Driver as a stand-alone process.
|
org.agrona.concurrent.AgentInvoker |
sharedAgentInvoker()
Get the
AgentInvoker for the shared agents when running without threads. |
public static void main(java.lang.String[] args)
args
- command line argumentspublic 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 org.agrona.concurrent.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 java.lang.AutoCloseable
public java.lang.String aeronDirectoryName()
launchEmbedded()
method is used.Copyright © 2014-2018 Real Logic Ltd. All Rights Reserved.