Examples of WaitStrategy


Examples of com.lmax.disruptor.WaitStrategy

    }

    private void run(String[] args) throws InterruptedException {

        // This is to keep my MBA from catching on fire...
        WaitStrategy waitStrategy = new BlockingWaitStrategy();

        RingBuffer<MarketEvent> ringBuffer = new RingBuffer<MarketEvent>(MarketEvent.FACTORY, getClaimStrategy(),
                waitStrategy);

        // Initial barrier
View Full Code Here

Examples of com.lmax.disruptor.WaitStrategy

        storm_conf.get(Config.TOPOLOGY_MESSAGE_TIMEOUT_SECS), 30);

    int queue_size = Utils.getInt(
        storm_conf.get(Config.TOPOLOGY_EXECUTOR_RECEIVE_BUFFER_SIZE),
        256);
    WaitStrategy waitStrategy = (WaitStrategy) Utils
        .newInstance((String) storm_conf
            .get(Config.TOPOLOGY_DISRUPTOR_WAIT_STRATEGY));
    this.exeQueue = new DisruptorQueue(idStr, ProducerType.MULTI,
        queue_size, waitStrategy);
    this.exeQueue.consumerStarted();
View Full Code Here

Examples of com.lmax.disruptor.WaitStrategy

  public DisruptorQueue registerDisruptorQueue() {
    int queueSize = JStormUtils.parseInt(
        stormConf.get(Config.TOPOLOGY_EXECUTOR_RECEIVE_BUFFER_SIZE), 256);
   
    WaitStrategy waitStrategy = (WaitStrategy) Utils
        .newInstance((String) stormConf
            .get(Config.TOPOLOGY_DISRUPTOR_WAIT_STRATEGY));
    DisruptorQueue queue = new DisruptorQueue("TaskDeserialize", ProducerType.SINGLE,
        queueSize, waitStrategy);
View Full Code Here

Examples of com.lmax.disruptor.WaitStrategy

  private AsyncLoopThread startDispatchThread() {
    Map stormConf = workerData.getStormConf();

    int queue_size = Utils.getInt(
        stormConf.get(Config.TOPOLOGY_TRANSFER_BUFFER_SIZE), 1024);
    WaitStrategy waitStrategy = (WaitStrategy) Utils
        .newInstance((String) stormConf
            .get(Config.TOPOLOGY_DISRUPTOR_WAIT_STRATEGY));
    DisruptorQueue recvQueue = new DisruptorQueue("Dispatch", ProducerType.MULTI,
        queue_size, waitStrategy);
    // stop  consumerStarted
View Full Code Here

Examples of com.lmax.disruptor.WaitStrategy

    this.transferQueue = workerData.getTransferQueue();
    this.innerTaskTransfer = workerData.getInnerTaskTransfer();

    int queue_size = Utils.getInt(storm_conf
        .get(Config.TOPOLOGY_EXECUTOR_SEND_BUFFER_SIZE));
    WaitStrategy waitStrategy = (WaitStrategy) Utils
        .newInstance((String) storm_conf
            .get(Config.TOPOLOGY_DISRUPTOR_WAIT_STRATEGY));
    this.serializeQueue = new DisruptorQueue(taskName, ProducerType.MULTI,
        queue_size, waitStrategy);
    this.serializeQueue.consumerStarted();
View Full Code Here

Examples of com.lmax.disruptor.WaitStrategy

              public Integer getValue() {
                return batchQueue.size();
              }
            }, null, Metrics.MetricType.WORKER);

    WaitStrategy waitStrategy = (WaitStrategy) Utils
        .newInstance((String) storm_conf
            .get(Config.TOPOLOGY_DISRUPTOR_WAIT_STRATEGY));

    disruptorQueue = new DisruptorQueue(name, ProducerType.MULTI,
        MAX_SEND_PENDING * 8, waitStrategy);
View Full Code Here

Examples of com.lmax.disruptor.WaitStrategy

    LOG.info("Disruptor use sleep " + disruptorUseSleep);

    // this.transferQueue = new LinkedBlockingQueue<TransferData>();
    int buffer_size = Utils.getInt(conf
        .get(Config.TOPOLOGY_TRANSFER_BUFFER_SIZE));
    WaitStrategy waitStrategy = (WaitStrategy) Utils
        .newInstance((String) conf
            .get(Config.TOPOLOGY_DISRUPTOR_WAIT_STRATEGY));
    this.transferQueue = new DisruptorQueue("TotalTransfer", ProducerType.MULTI,
        buffer_size, waitStrategy);
    this.transferQueue.consumerStarted();
View Full Code Here

Examples of com.lmax.disruptor.WaitStrategy

    IConnection server = null;
    IConnection client = null;

    server = context.bind(null, port);

    WaitStrategy waitStrategy = (WaitStrategy) Utils
        .newInstance((String) storm_conf
            .get(Config.TOPOLOGY_DISRUPTOR_WAIT_STRATEGY));
    DisruptorQueue recvQueue = new DisruptorQueue(
        "NettyUnitTest", ProducerType.SINGLE, 1024, waitStrategy);
    server.registerQueue(recvQueue);
View Full Code Here

Examples of com.lmax.disruptor.WaitStrategy

    IConnection server = null;
    IConnection client = null;

    server = context.bind(null, port);

    WaitStrategy waitStrategy = (WaitStrategy) Utils
        .newInstance((String) storm_conf
            .get(Config.TOPOLOGY_DISRUPTOR_WAIT_STRATEGY));
    DisruptorQueue recvQueue = new DisruptorQueue(
        "NettyUnitTest", ProducerType.SINGLE, 1024, waitStrategy);
    server.registerQueue(recvQueue);
View Full Code Here

Examples of com.lmax.disruptor.WaitStrategy

    IConnection server = null;
    IConnection client = null;

    server = context.bind(null, port);

    WaitStrategy waitStrategy = (WaitStrategy) Utils
        .newInstance((String) storm_conf
            .get(Config.TOPOLOGY_DISRUPTOR_WAIT_STRATEGY));
    DisruptorQueue recvQueue = new DisruptorQueue(
        "NettyUnitTest", ProducerType.SINGLE, 1024, waitStrategy);
    server.registerQueue(recvQueue);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.