Examples of HashedWheelTimer


Examples of org.jboss.netty.util.HashedWheelTimer

    public OpenflowPipelineFactory(Controller controller,
                                   ThreadPoolExecutor pipelineExecutor) {
        super();
        this.controller = controller;
        this.pipelineExecutor = pipelineExecutor;
        this.timer = new HashedWheelTimer();
        this.idleHandler = new IdleStateHandler(timer, 20, 25, 0);
        this.readTimeoutHandler = new ReadTimeoutHandler(timer, 30);
    }
View Full Code Here

Examples of org.jboss.netty.util.HashedWheelTimer

        this.port = port;
    }

    public void run() {
        // Initialize the timer that schedules subsequent reconnection attempts.
        final Timer timer = new HashedWheelTimer();

        // Configure the client.
        final ClientBootstrap bootstrap = new ClientBootstrap(
                new NioClientSocketChannelFactory(
                        Executors.newCachedThreadPool(),
View Full Code Here

Examples of org.jboss.netty.util.HashedWheelTimer

    // Now we swap the timer in client with our taskTimer which helps in making
    // the mainGet request during the period of wait for probe, in which case
    // the code path for the alreadyNSREd region will kick in.
    FakeTaskTimer taskTimer = new FakeTaskTimer();
    HashedWheelTimer originalTimer = Whitebox.getInternalState(client,
                                                               "timer");
    Whitebox.setInternalState(client, "timer", taskTimer);


    // Code for execution of the test start the execution of triggerGet, this
View Full Code Here

Examples of org.jboss.netty.util.HashedWheelTimer

    final ArrayList<KeyValue> row = new ArrayList<KeyValue>(1);
    row.add(KV);

    // The Timers which will be swapped to simulate the pause for probe RPC
    final FakeTaskTimer taskTimer = new FakeTaskTimer();
    final HashedWheelTimer originalTimer = Whitebox.getInternalState(client,
                                                                     "timer");

    // Always this region client will be always returns true.
    when(regionclient.isAlive()).thenReturn(true);
View Full Code Here

Examples of org.jboss.netty.util.HashedWheelTimer

    final ChannelFactory channelFactory = new NioClientSocketChannelFactory(
        Executors.newCachedThreadPool(),
        Executors.newCachedThreadPool());

    // Timer
    timer = new HashedWheelTimer();

    // Create bootstrap
    bootstrap = new ClientBootstrap(channelFactory);

    // Set up pipeline factory.
View Full Code Here

Examples of org.jboss.netty.util.HashedWheelTimer

    // Set up channel factory
    final ChannelFactory channelFactory = new NioDatagramChannelFactory(
        Executors.newCachedThreadPool());

    // Timer
    timer = new HashedWheelTimer();

    // Create bootstrap
    bootstrap = new ConnectionlessBootstrap(channelFactory);

    // Set up pipeline factory.
View Full Code Here

Examples of org.jboss.netty.util.HashedWheelTimer

    this.password = password;
    this.executor = exec;
   
    this.proxySettings = proxy;

    timer = new HashedWheelTimer();
   
    channelFactory = new NioClientSocketChannelFactory(
        executor, 1, new NioWorkerPool(executor, DEFAULT_IO_THREADS), timer);

    boot = new ClientBootstrap(channelFactory);
View Full Code Here

Examples of org.jboss.netty.util.HashedWheelTimer

        } else {
            clientBootstrap = new ClientBootstrap(new NioClientSocketChannelFactory(
                    Executors.newCachedThreadPool(daemonThreadFactory(settings, "transport_client_boss")),
                    bossCount,
                    new NioWorkerPool(Executors.newCachedThreadPool(daemonThreadFactory(settings, "transport_client_worker")), workerCount),
                    new HashedWheelTimer(daemonThreadFactory(settings, "transport_client_timer"))));
        }
        ChannelPipelineFactory clientPipelineFactory = new ChannelPipelineFactory() {
            @Override
            public ChannelPipeline getPipeline() throws Exception {
                ChannelPipeline pipeline = Channels.pipeline();
View Full Code Here

Examples of org.jboss.netty.util.HashedWheelTimer

        String name = configBuilder.getNiftyName();

        String prefix = "nifty-client" + (Strings.isNullOrEmpty(name) ? "" : "-" + name);

        this.hashedWheelTimer = new HashedWheelTimer(renamingDaemonThreadFactory(prefix + "-timer-%s"));
        this.bossExecutor = newCachedThreadPool(renamingDaemonThreadFactory(prefix + "-boss-%s"));
        this.workerExecutor = newCachedThreadPool(renamingDaemonThreadFactory(prefix + "-worker-%s"));
        this.defaultSocksProxyAddress = defaultSocksProxyAddress;

        int bossThreadCount = configBuilder.getNiftyBossThreadCount();
View Full Code Here

Examples of org.jboss.netty.util.HashedWheelTimer

        this(hello, handler, logger, readTimeout, null);
    }
   

    public ImapStreamChannelUpstreamHandler(final String hello, final ImapRequestStreamHandler handler, final Log logger, final long readTimeout, SSLEngine engine) {
        super(new HashedWheelTimer(), readTimeout, TimeUnit.SECONDS);
        this.logger = logger;
        this.hello = hello;
        this.handler = handler;
        this.engine = engine;
    }
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.