Search in sources :

Example 1 with ShutdownSignalBarrier

use of org.agrona.concurrent.ShutdownSignalBarrier in project Aeron by real-logic.

the class LowLatencyMediaDriver method main.

public static void main(final String[] args) throws Exception {
    MediaDriver.loadPropertiesFiles(args);
    final MediaDriver.Context ctx = new MediaDriver.Context().termBufferSparseFile(false).threadingMode(ThreadingMode.DEDICATED).conductorIdleStrategy(new BusySpinIdleStrategy()).receiverIdleStrategy(new BusySpinIdleStrategy()).senderIdleStrategy(new BusySpinIdleStrategy());
    try (MediaDriver ignored = MediaDriver.launch(ctx)) {
        new ShutdownSignalBarrier().await();
        System.out.println("Shutdown Driver...");
    }
}
Also used : ShutdownSignalBarrier(org.agrona.concurrent.ShutdownSignalBarrier) MediaDriver(io.aeron.driver.MediaDriver) BusySpinIdleStrategy(org.agrona.concurrent.BusySpinIdleStrategy)

Aggregations

MediaDriver (io.aeron.driver.MediaDriver)1 BusySpinIdleStrategy (org.agrona.concurrent.BusySpinIdleStrategy)1 ShutdownSignalBarrier (org.agrona.concurrent.ShutdownSignalBarrier)1