Search in sources :

Example 1 with PublisherConfig

use of net.openhft.load.config.PublisherConfig in project Chronicle-Queue by OpenHFT.

the class PublisherMain method main.

public static void main(String[] args) throws Exception {
    // MlockAll.doMlockall();
    if (args.length != 1) {
        throw new IllegalArgumentException("Usage: <program> [resource-name]");
    }
    final ConfigParser configParser = new ConfigParser(args[0]);
    final PublisherConfig publisherConfig = configParser.getPublisherConfig();
    final ExecutorService executorService = Executors.newFixedThreadPool(2);
    executorService.submit(new PretoucherTask(outputQueue(publisherConfig.outputDir()), configParser.getPretouchIntervalMillis()));
    executorService.submit(new HiccupReporter()::start);
    final Publisher publisher = new Publisher(publisherConfig, createOutput(publisherConfig.outputDir()), configParser.getAllStageConfigs());
    publisher.init();
    publisher.startPublishing();
}
Also used : ExecutorService(java.util.concurrent.ExecutorService) ConfigParser(net.openhft.load.config.ConfigParser) PublisherConfig(net.openhft.load.config.PublisherConfig)

Aggregations

ExecutorService (java.util.concurrent.ExecutorService)1 ConfigParser (net.openhft.load.config.ConfigParser)1 PublisherConfig (net.openhft.load.config.PublisherConfig)1