Java Code Examples for io.aeron.driver.MediaDriver#launch()

The following examples show how to use io.aeron.driver.MediaDriver#launch() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LowLatencyMediaDriver.java    From deeplearning4j with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("checkstyle:UncommentedMain")
public static void main(final String... args) {
    MediaDriver.loadPropertiesFiles(args);

    setProperty(DISABLE_BOUNDS_CHECKS_PROP_NAME, "true");
    setProperty("aeron.mtu.length", "16384");
    setProperty("aeron.socket.so_sndbuf", "2097152");
    setProperty("aeron.socket.so_rcvbuf", "2097152");
    setProperty("aeron.rcv.initial.window.length", "2097152");

    final MediaDriver.Context ctx =
                    new MediaDriver.Context().threadingMode(ThreadingMode.DEDICATED).dirsDeleteOnStart(true)
                                    .termBufferSparseFile(false).conductorIdleStrategy(new BusySpinIdleStrategy())
                                    .receiverIdleStrategy(new BusySpinIdleStrategy())
                                    .senderIdleStrategy(new BusySpinIdleStrategy());

    try (MediaDriver ignored = MediaDriver.launch(ctx)) {
        new SigIntBarrier().await();

    }
}
 
Example 2
Source File: EmbeddedPingPong.java    From aeron with Apache License 2.0 6 votes vote down vote up
public static void main(final String[] args) throws Exception
{
    loadPropertiesFiles(args);

    final MediaDriver.Context ctx = new MediaDriver.Context()
        .threadingMode(ThreadingMode.DEDICATED)
        .conductorIdleStrategy(new BackoffIdleStrategy(1, 1, 1000, 1000))
        .receiverIdleStrategy(NoOpIdleStrategy.INSTANCE)
        .senderIdleStrategy(NoOpIdleStrategy.INSTANCE);

    try (MediaDriver ignored = MediaDriver.launch(ctx);
        Aeron aeron = Aeron.connect())
    {
        final Thread pongThread = startPong(aeron);
        pongThread.start();

        runPing(aeron);
        RUNNING.set(false);
        pongThread.join();

        System.out.println("Shutdown Driver...");
    }
}
 
Example 3
Source File: LowLatencyMediaDriver.java    From nd4j with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("checkstyle:UncommentedMain")
public static void main(final String... args) {
    MediaDriver.loadPropertiesFiles(args);

    setProperty(DISABLE_BOUNDS_CHECKS_PROP_NAME, "true");
    setProperty("aeron.mtu.length", "16384");
    setProperty("aeron.socket.so_sndbuf", "2097152");
    setProperty("aeron.socket.so_rcvbuf", "2097152");
    setProperty("aeron.rcv.initial.window.length", "2097152");

    final MediaDriver.Context ctx =
                    new MediaDriver.Context().threadingMode(ThreadingMode.DEDICATED).dirsDeleteOnStart(true)
                                    .termBufferSparseFile(false).conductorIdleStrategy(new BusySpinIdleStrategy())
                                    .receiverIdleStrategy(new BusySpinIdleStrategy())
                                    .senderIdleStrategy(new BusySpinIdleStrategy());

    try (MediaDriver ignored = MediaDriver.launch(ctx)) {
        new SigIntBarrier().await();

    }
}
 
Example 4
Source File: SingleNodeCluster.java    From aeron with Apache License 2.0 6 votes vote down vote up
void connectClientToCluster()
{
    final String aeronDirectoryName = CommonContext.getAeronDirectoryName() + "-client";

    clientMediaDriver = MediaDriver.launch(
        new MediaDriver.Context()
            .threadingMode(ThreadingMode.SHARED)
            .dirDeleteOnStart(true)
            .dirDeleteOnShutdown(true)
            .errorHandler(Throwable::printStackTrace)
            .aeronDirectoryName(aeronDirectoryName));

    client = AeronCluster.connect(
        new AeronCluster.Context()
            .errorHandler(Throwable::printStackTrace)
            .egressListener(egressMessageListener)
            .aeronDirectoryName(aeronDirectoryName));
}
 
Example 5
Source File: MultiDriverTest.java    From aeron with Apache License 2.0 6 votes vote down vote up
private void launch()
{
    final String baseDirA = ROOT_DIR + "A";
    final String baseDirB = ROOT_DIR + "B";

    buffer.putInt(0, 1);

    final MediaDriver.Context driverAContext = new MediaDriver.Context()
        .errorHandler(Tests::onError)
        .publicationTermBufferLength(TERM_BUFFER_LENGTH)
        .aeronDirectoryName(baseDirA)
        .threadingMode(THREADING_MODE);

    final MediaDriver.Context driverBContext = new MediaDriver.Context()
        .errorHandler(Tests::onError)
        .publicationTermBufferLength(TERM_BUFFER_LENGTH)
        .aeronDirectoryName(baseDirB)
        .threadingMode(THREADING_MODE);

    driverA = MediaDriver.launch(driverAContext);
    driverB = MediaDriver.launch(driverBContext);
    clientA = Aeron.connect(new Aeron.Context().aeronDirectoryName(driverAContext.aeronDirectoryName()));
    clientB = Aeron.connect(new Aeron.Context().aeronDirectoryName(driverBContext.aeronDirectoryName()));
}
 
Example 6
Source File: LowLatencyMediaDriver.java    From rpc-bench with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("checkstyle:UncommentedMain")
public static void main(final String... args) {
  MediaDriver.loadPropertiesFiles(args);

  setProperty(DISABLE_BOUNDS_CHECKS_PROP_NAME, "true");
  setProperty("aeron.mtu.length", "16384");
  setProperty("aeron.socket.so_sndbuf", "2097152");
  setProperty("aeron.socket.so_rcvbuf", "2097152");
  setProperty("aeron.rcv.initial.window.length", "2097152");

  final MediaDriver.Context ctx = new MediaDriver.Context()
      .threadingMode(ThreadingMode.DEDICATED)
      .dirsDeleteOnStart(true)
      .termBufferSparseFile(false)
      .conductorIdleStrategy(new BusySpinIdleStrategy())
      .receiverIdleStrategy(new BusySpinIdleStrategy())
      .senderIdleStrategy(new BusySpinIdleStrategy());

  try (MediaDriver ignored = MediaDriver.launch(ctx)) {
    new SigIntBarrier().await();

  }
}
 
Example 7
Source File: ClusterBackupMediaDriver.java    From aeron with Apache License 2.0 5 votes vote down vote up
/**
 * Launch a new {@link ClusterBackupMediaDriver} with provided contexts.
 *
 * @param driverCtx        for configuring the {@link MediaDriver}.
 * @param archiveCtx       for configuring the {@link Archive}.
 * @param clusterBackupCtx for the configuration of the {@link ClusterBackup}.
 * @return a new {@link ClusterBackupMediaDriver} with the provided contexts.
 */
public static ClusterBackupMediaDriver launch(
    final MediaDriver.Context driverCtx,
    final Archive.Context archiveCtx,
    final ClusterBackup.Context clusterBackupCtx)
{
    MediaDriver driver = null;
    Archive archive = null;
    ClusterBackup clusterBackup = null;

    try
    {
        driver = MediaDriver.launch(driverCtx
            .spiesSimulateConnection(true));

        final int errorCounterId = SystemCounterDescriptor.ERRORS.id();
        final AtomicCounter errorCounter = null == archiveCtx.errorCounter() ?
            new AtomicCounter(driverCtx.countersValuesBuffer(), errorCounterId) : archiveCtx.errorCounter();

        final ErrorHandler errorHandler = null == archiveCtx.errorHandler() ?
            driverCtx.errorHandler() : archiveCtx.errorHandler();

        archive = Archive.launch(archiveCtx
            .aeronDirectoryName(driverCtx.aeronDirectoryName())
            .mediaDriverAgentInvoker(driver.sharedAgentInvoker())
            .errorHandler(errorHandler)
            .errorCounter(errorCounter));

        clusterBackup = ClusterBackup.launch(clusterBackupCtx
            .aeronDirectoryName(driverCtx.aeronDirectoryName()));

        return new ClusterBackupMediaDriver(driver, archive, clusterBackup);
    }
    catch (final Throwable throwable)
    {
        CloseHelper.quietCloseAll(driver, archive, clusterBackup);
        throw throwable;
    }
}
 
Example 8
Source File: EmbeddedExclusiveBufferClaimIpcThroughput.java    From aeron with Apache License 2.0 5 votes vote down vote up
public static void main(final String[] args) throws Exception
{
    loadPropertiesFiles(args);

    final AtomicBoolean running = new AtomicBoolean(true);
    SigInt.register(() -> running.set(false));

    final MediaDriver.Context ctx = new MediaDriver.Context()
        .threadingMode(ThreadingMode.SHARED);

    try (MediaDriver ignore = MediaDriver.launch(ctx);
        Aeron aeron = Aeron.connect();
        Subscription subscription = aeron.addSubscription(CHANNEL, STREAM_ID);
        Publication publication = aeron.addExclusivePublication(CHANNEL, STREAM_ID))
    {
        final ImageRateSubscriber subscriber = new ImageRateSubscriber(FRAGMENT_COUNT_LIMIT, running, subscription);
        final Thread subscriberThread = new Thread(subscriber);
        subscriberThread.setName("subscriber");
        final Thread publisherThread = new Thread(new Publisher(running, publication));
        publisherThread.setName("publisher");
        final Thread rateReporterThread = new Thread(new ImageRateReporter(MESSAGE_LENGTH, running, subscriber));
        rateReporterThread.setName("rate-reporter");

        rateReporterThread.start();
        subscriberThread.start();
        publisherThread.start();

        subscriberThread.join();
        publisherThread.join();
        rateReporterThread.join();
    }
}
 
Example 9
Source File: TestCluster.java    From aeron with Apache License 2.0 5 votes vote down vote up
AeronCluster connectClient()
{
    final String aeronDirName = CommonContext.getAeronDirectoryName();

    if (null == clientMediaDriver)
    {
        dataCollector.add(Paths.get(aeronDirName));

        clientMediaDriver = MediaDriver.launch(
            new MediaDriver.Context()
                .threadingMode(ThreadingMode.SHARED)
                .dirDeleteOnStart(true)
                .dirDeleteOnShutdown(false)
                .aeronDirectoryName(aeronDirName));
    }

    CloseHelper.close(client);
    client = AeronCluster.connect(
        new AeronCluster.Context()
            .aeronDirectoryName(aeronDirName)
            .egressListener(egressMessageListener)
            .ingressChannel("aeron:udp?term-length=64k")
            .egressChannel(CLUSTER_EGRESS_CHANNEL)
            .ingressEndpoints(staticClusterMemberEndpoints));

    return client;
}
 
Example 10
Source File: ClusteredMediaDriver.java    From aeron with Apache License 2.0 5 votes vote down vote up
/**
 * Launch a new {@link ClusteredMediaDriver} with provided contexts.
 *
 * @param driverCtx          for configuring the {@link MediaDriver}.
 * @param archiveCtx         for configuring the {@link Archive}.
 * @param consensusModuleCtx for the configuration of the {@link ConsensusModule}.
 * @return a new {@link ClusteredMediaDriver} with the provided contexts.
 */
public static ClusteredMediaDriver launch(
    final MediaDriver.Context driverCtx,
    final Archive.Context archiveCtx,
    final ConsensusModule.Context consensusModuleCtx)
{
    MediaDriver driver = null;
    Archive archive = null;
    ConsensusModule consensusModule = null;

    try
    {
        driver = MediaDriver.launch(driverCtx
            .spiesSimulateConnection(true));

        final int errorCounterId = SystemCounterDescriptor.ERRORS.id();
        final AtomicCounter errorCounter = null == archiveCtx.errorCounter() ?
            new AtomicCounter(driverCtx.countersValuesBuffer(), errorCounterId) : archiveCtx.errorCounter();

        final ErrorHandler errorHandler = null == archiveCtx.errorHandler() ?
            driverCtx.errorHandler() : archiveCtx.errorHandler();

        archive = Archive.launch(archiveCtx
            .mediaDriverAgentInvoker(driver.sharedAgentInvoker())
            .aeronDirectoryName(driver.aeronDirectoryName())
            .errorHandler(errorHandler)
            .errorCounter(errorCounter));

        consensusModule = ConsensusModule.launch(consensusModuleCtx
            .aeronDirectoryName(driverCtx.aeronDirectoryName()));

        return new ClusteredMediaDriver(driver, archive, consensusModule);
    }
    catch (final Exception ex)
    {
        CloseHelper.quietCloseAll(consensusModule, archive, driver);
        throw ex;
    }
}
 
Example 11
Source File: AeronIpcBenchmark.java    From benchmarks with Apache License 2.0 5 votes vote down vote up
@Setup
public synchronized void setup()
{
    for (int i = 0; i < MAX_THREAD_COUNT; i++)
    {
        responseQueues[i] = new OneToOneConcurrentArrayQueue<>(RESPONSE_QUEUE_CAPACITY);
    }

    values = new int[burstLength];
    for (int i = 0; i < burstLength; i++)
    {
        values[i] = -(burstLength - i);
    }

    ctx = new MediaDriver.Context()
        .termBufferSparseFile(false)
        .threadingMode(ThreadingMode.SHARED)
        .sharedIdleStrategy(new BusySpinIdleStrategy())
        .dirDeleteOnStart(true);

    mediaDriver = MediaDriver.launch(ctx);
    aeron = Aeron.connect(new Aeron.Context().preTouchMappedMemory(true));
    publication = aeron.addPublication(CommonContext.IPC_CHANNEL, STREAM_ID);
    subscription = aeron.addSubscription(CommonContext.IPC_CHANNEL, STREAM_ID);

    consumerThread = new Thread(new Subscriber(subscription, running, responseQueues));

    consumerThread.setName("consumer");
    consumerThread.start();
}
 
Example 12
Source File: AeronExclusiveIpcBenchmark.java    From benchmarks with Apache License 2.0 5 votes vote down vote up
@Setup
public synchronized void setup()
{
    for (int i = 0; i < MAX_THREAD_COUNT; i++)
    {
        responseQueues[i] = new OneToOneConcurrentArrayQueue<>(RESPONSE_QUEUE_CAPACITY);
    }

    values = new int[burstLength];
    for (int i = 0; i < burstLength; i++)
    {
        values[i] = -(burstLength - i);
    }

    ctx = new MediaDriver.Context()
        .termBufferSparseFile(false)
        .threadingMode(ThreadingMode.SHARED)
        .sharedIdleStrategy(new BusySpinIdleStrategy())
        .dirDeleteOnStart(true);

    mediaDriver = MediaDriver.launch(ctx);
    aeron = Aeron.connect(new Aeron.Context().preTouchMappedMemory(true));
    publication = aeron.addExclusivePublication(CommonContext.IPC_CHANNEL, STREAM_ID);
    subscription = aeron.addSubscription(CommonContext.IPC_CHANNEL, STREAM_ID);

    consumerThread = new Thread(new Subscriber(subscription, running, responseQueues));

    consumerThread.setName("consumer");
    consumerThread.start();
}
 
Example 13
Source File: ArchivingMediaDriver.java    From benchmarks with Apache License 2.0 5 votes vote down vote up
static ArchivingMediaDriver launchArchiveWithEmbeddedDriver()
{
    MediaDriver driver = null;
    Archive archive = null;
    try
    {
        final MediaDriver.Context driverCtx = new MediaDriver.Context()
            .dirDeleteOnStart(true)
            .spiesSimulateConnection(true);

        driver = MediaDriver.launch(driverCtx);

        final Archive.Context archiveCtx = new Archive.Context()
            .aeronDirectoryName(driverCtx.aeronDirectoryName())
            .deleteArchiveOnStart(true);

        final int errorCounterId = SystemCounterDescriptor.ERRORS.id();
        final AtomicCounter errorCounter = null == archiveCtx.errorCounter() ?
            new AtomicCounter(driverCtx.countersValuesBuffer(), errorCounterId) : archiveCtx.errorCounter();

        final ErrorHandler errorHandler = null == archiveCtx.errorHandler() ?
            driverCtx.errorHandler() : archiveCtx.errorHandler();

        archive = Archive.launch(archiveCtx
            .mediaDriverAgentInvoker(driver.sharedAgentInvoker())
            .aeronDirectoryName(driverCtx.aeronDirectoryName())
            .errorHandler(errorHandler)
            .errorCounter(errorCounter));
        return new ArchivingMediaDriver(driver, archive);
    }
    catch (final Exception ex)
    {
        CloseHelper.quietCloseAll(archive, driver);
        throw ex;
    }
}
 
Example 14
Source File: AeronUtil.java    From benchmarks with Apache License 2.0 5 votes vote down vote up
static MediaDriver launchEmbeddedMediaDriverIfConfigured()
{
    if (embeddedMediaDriver())
    {
        return MediaDriver.launch(new MediaDriver.Context()
            .dirDeleteOnStart(true)
            .spiesSimulateConnection(true));
    }

    return null;
}
 
Example 15
Source File: FixBenchmarkServer.java    From artio with Apache License 2.0 5 votes vote down vote up
private static MediaDriver newMediaDriver()
{
    final MediaDriver.Context context = new MediaDriver.Context()
        .dirDeleteOnStart(true)
        .publicationTermBufferLength(128 * 1024 * 1024);

    return MediaDriver.launch(context);
}
 
Example 16
Source File: JavaTestMediaDriver.java    From aeron with Apache License 2.0 4 votes vote down vote up
public static JavaTestMediaDriver launch(final MediaDriver.Context context)
{
    final MediaDriver mediaDriver = MediaDriver.launch(context);
    return new JavaTestMediaDriver(mediaDriver);
}
 
Example 17
Source File: EmbeddedThroughput.java    From aeron with Apache License 2.0 4 votes vote down vote up
public static void main(final String[] args) throws Exception
{
    loadPropertiesFiles(args);

    final RateReporter reporter = new RateReporter(TimeUnit.SECONDS.toNanos(1), EmbeddedThroughput::printRate);
    final ExecutorService executor = Executors.newFixedThreadPool(2);
    final AtomicBoolean running = new AtomicBoolean(true);

    try (MediaDriver ignore = MediaDriver.launch();
        Aeron aeron = Aeron.connect();
        Subscription subscription = aeron.addSubscription(CHANNEL, STREAM_ID);
        Publication publication = aeron.addPublication(CHANNEL, STREAM_ID))
    {
        executor.execute(reporter);
        executor.execute(() -> SamplesUtil.subscriberLoop(
            rateReporterHandler(reporter), FRAGMENT_COUNT_LIMIT, running).accept(subscription));

        final ContinueBarrier barrier = new ContinueBarrier("Execute again?");
        final IdleStrategy idleStrategy = SampleConfiguration.newIdleStrategy();

        do
        {
            System.out.format(
                "%nStreaming %,d messages of payload length %d bytes to %s on stream id %d%n",
                NUMBER_OF_MESSAGES, MESSAGE_LENGTH, CHANNEL, STREAM_ID);

            printingActive = true;

            long backPressureCount = 0;
            for (long i = 0; i < NUMBER_OF_MESSAGES; i++)
            {
                OFFER_BUFFER.putLong(0, i);

                idleStrategy.reset();
                while (publication.offer(OFFER_BUFFER, 0, MESSAGE_LENGTH, null) < 0)
                {
                    backPressureCount++;
                    idleStrategy.idle();
                }
            }

            System.out.println(
                "Done streaming. backPressureRatio=" + ((double)backPressureCount / NUMBER_OF_MESSAGES));

            if (LINGER_TIMEOUT_MS > 0)
            {
                System.out.println("Lingering for " + LINGER_TIMEOUT_MS + " milliseconds...");
                Thread.sleep(LINGER_TIMEOUT_MS);
            }

            printingActive = false;
        }
        while (barrier.await());

        running.set(false);
        reporter.halt();
        executor.shutdown();
    }
}
 
Example 18
Source File: EmbeddedExclusiveSpiedThroughput.java    From aeron with Apache License 2.0 4 votes vote down vote up
public static void main(final String[] args) throws Exception
{
    loadPropertiesFiles(args);

    final RateReporter reporter = new RateReporter(
        TimeUnit.SECONDS.toNanos(1), EmbeddedExclusiveSpiedThroughput::printRate);
    final ExecutorService executor = Executors.newFixedThreadPool(2);
    final AtomicBoolean running = new AtomicBoolean(true);

    final MediaDriver.Context ctx = new MediaDriver.Context()
        .spiesSimulateConnection(true);

    try (MediaDriver ignore = MediaDriver.launch(ctx);
        Aeron aeron = Aeron.connect();
        Subscription subscription = aeron.addSubscription(CommonContext.SPY_PREFIX + CHANNEL, STREAM_ID);
        ExclusivePublication publication = aeron.addExclusivePublication(CHANNEL, STREAM_ID))
    {
        executor.execute(reporter);
        executor.execute(() -> SamplesUtil.subscriberLoop(
            rateReporterHandler(reporter), FRAGMENT_COUNT_LIMIT, running).accept(subscription));

        final ContinueBarrier barrier = new ContinueBarrier("Execute again?");
        final IdleStrategy idleStrategy = SampleConfiguration.newIdleStrategy();

        do
        {
            System.out.format(
                "%nStreaming %,d messages of payload length %d bytes to %s on stream id %d%n",
                NUMBER_OF_MESSAGES, MESSAGE_LENGTH, CHANNEL, STREAM_ID);

            printingActive = true;

            long backPressureCount = 0;
            for (long i = 0; i < NUMBER_OF_MESSAGES; i++)
            {
                OFFER_BUFFER.putLong(0, i);

                idleStrategy.reset();
                while (publication.offer(OFFER_BUFFER, 0, MESSAGE_LENGTH, null) < 0)
                {
                    backPressureCount++;
                    idleStrategy.idle();
                }
            }

            System.out.println(
                "Done streaming. backPressureRatio=" + ((double)backPressureCount / NUMBER_OF_MESSAGES));

            if (LINGER_TIMEOUT_MS > 0)
            {
                System.out.println("Lingering for " + LINGER_TIMEOUT_MS + " milliseconds...");
                Thread.sleep(LINGER_TIMEOUT_MS);
            }

            printingActive = false;
        }
        while (barrier.await());

        running.set(false);
        reporter.halt();
        executor.shutdown();
    }
}
 
Example 19
Source File: EmbeddedExclusiveThroughput.java    From aeron with Apache License 2.0 4 votes vote down vote up
public static void main(final String[] args) throws Exception
{
    loadPropertiesFiles(args);

    final RateReporter reporter = new RateReporter(
        TimeUnit.SECONDS.toNanos(1), EmbeddedExclusiveThroughput::printRate);
    final ExecutorService executor = Executors.newFixedThreadPool(2);
    final AtomicBoolean running = new AtomicBoolean(true);

    try (MediaDriver ignore = MediaDriver.launch();
        Aeron aeron = Aeron.connect();
        Subscription subscription = aeron.addSubscription(CHANNEL, STREAM_ID);
        ExclusivePublication publication = aeron.addExclusivePublication(CHANNEL, STREAM_ID))
    {
        executor.execute(reporter);
        executor.execute(() -> SamplesUtil.subscriberLoop(
            rateReporterHandler(reporter), FRAGMENT_COUNT_LIMIT, running).accept(subscription));

        final ContinueBarrier barrier = new ContinueBarrier("Execute again?");
        final IdleStrategy idleStrategy = SampleConfiguration.newIdleStrategy();

        do
        {
            System.out.format(
                "%nStreaming %,d messages of payload length %d bytes to %s on stream id %d%n",
                NUMBER_OF_MESSAGES, MESSAGE_LENGTH, CHANNEL, STREAM_ID);

            printingActive = true;

            long backPressureCount = 0;
            for (long i = 0; i < NUMBER_OF_MESSAGES; i++)
            {
                OFFER_BUFFER.putLong(0, i);

                idleStrategy.reset();
                while (publication.offer(OFFER_BUFFER, 0, MESSAGE_LENGTH, null) < 0)
                {
                    backPressureCount++;
                    idleStrategy.idle();
                }
            }

            System.out.println(
                "Done streaming. backPressureRatio=" + ((double)backPressureCount / NUMBER_OF_MESSAGES));

            if (LINGER_TIMEOUT_MS > 0)
            {
                System.out.println("Lingering for " + LINGER_TIMEOUT_MS + " milliseconds...");
                Thread.sleep(LINGER_TIMEOUT_MS);
            }

            printingActive = false;
        }
        while (barrier.await());

        running.set(false);
        reporter.halt();
        executor.shutdown();
    }
}
 
Example 20
Source File: TestFixtures.java    From artio with Apache License 2.0 4 votes vote down vote up
public static MediaDriver launchJustMediaDriver()
{
    return MediaDriver.launch(mediaDriverContext(TERM_BUFFER_LENGTH, true));
}