Package org.glassfish.grizzly.utils

Examples of org.glassfish.grizzly.utils.DelayedExecutor$Worker


                        r);
                    newThread.setDaemon(true);
                    return newThread;
                }
            });
        delayedExecutor = new DelayedExecutor(auxExecutorService);
    }
View Full Code Here


            });
        delayedExecutor = new DelayedExecutor(auxExecutorService);
    }

    protected void stopDelayedExecutor() {
        final DelayedExecutor localDelayedExecutor = delayedExecutor;
        delayedExecutor = null;
        if (localDelayedExecutor != null) {
            localDelayedExecutor.stop();
            localDelayedExecutor.destroy();
        }
        final ExecutorService localThreadPool = auxExecutorService;
        auxExecutorService = null;
        if (localThreadPool != null) {
            localThreadPool.shutdownNow();
View Full Code Here

        if (config.getThreadFactory() == null) {
            config.setThreadFactory(getDefaultThreadFactory());
        }

        transactionTimeoutMillis = config.getTransactionTimeout(TimeUnit.MILLISECONDS);
        final DelayedExecutor transactionMonitor = transactionTimeoutMillis > 0 ?
            config.getTransactionMonitor() : null;

        if (transactionMonitor != null) {
            final DelayedExecutor.Worker<Worker> transactionWorker =
                    new DelayedExecutor.Worker<Worker>() {

                @Override
                public boolean doWork(final Worker worker) {
                    worker.t.interrupt();
                    delayedQueue.add(worker, NEVER_TIMEOUT, TimeUnit.MILLISECONDS);
                    return true;
                }
            };
            delayedQueue = transactionMonitor.createDelayQueue(
                    transactionWorker, transactionResolver);
        } else {
            delayedQueue = null;
        }
    }
View Full Code Here

        state = State.RUNNING;
        shutdownFuture = null;
       
        configureAuxThreadPool();

        delayedExecutor = new DelayedExecutor(auxExecutorService);
        delayedExecutor.start();

        for (final NetworkListener listener : listeners.values()) {
            configureListener(listener);
        }
View Full Code Here

    private FilterChain constructFilterChain(final RexsterApplication application) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
        final FilterChainBuilder filterChainBuilder = FilterChainBuilder.stateless();
        filterChainBuilder.add(new TransportFilter());

        final DelayedExecutor idleDelayedExecutor = IdleTimeoutFilter.createDefaultIdleDelayedExecutor(
                this.sessionCheckInterval, TimeUnit.MILLISECONDS);
        idleDelayedExecutor.start();
        filterChainBuilder.add(new IdleTimeoutFilter(idleDelayedExecutor, this.sessionMaxIdle, TimeUnit.MILLISECONDS));

        filterChainBuilder.add(new RexProServerFilter(application));

        HierarchicalConfiguration securityConfiguration = properties.getSecuritySettings();
View Full Code Here

                        r);
                    newThread.setDaemon(true);
                    return newThread;
                }
            });
        delayedExecutor = new DelayedExecutor(auxExecutorService);
    }
View Full Code Here

            });
        delayedExecutor = new DelayedExecutor(auxExecutorService);
    }

    protected void stopDelayedExecutor() {
        final DelayedExecutor localDelayedExecutor = delayedExecutor;
        delayedExecutor = null;
        if (localDelayedExecutor != null) {
            localDelayedExecutor.stop();
            localDelayedExecutor.destroy();
        }
        final ExecutorService localThreadPool = auxExecutorService;
        auxExecutorService = null;
        if (localThreadPool != null) {
            localThreadPool.shutdownNow();
View Full Code Here

        state = State.RUNNING;
        shutdownFuture = null;
       
        configureAuxThreadPool();

        delayedExecutor = new DelayedExecutor(auxExecutorService);
        delayedExecutor.start();

        for (final NetworkListener listener : listeners.values()) {
            configureListener(listener);
        }
View Full Code Here

                        r);
                    newThread.setDaemon(true);
                    return newThread;
                }
            });
        delayedExecutor = new DelayedExecutor(auxExecutorService);
        return delayedExecutor;
    }
View Full Code Here

        }
    }
   
    protected void stopDelayedExecutor() {
        if (delayedExecutor != null) {
            final DelayedExecutor localDelayedExecutor = delayedExecutor;
            delayedExecutor = null;
            if (localDelayedExecutor != null) {
                localDelayedExecutor.stop();
                localDelayedExecutor.destroy();
            }
            final ExecutorService localThreadPool = auxExecutorService;
            auxExecutorService = null;
            if (localThreadPool != null) {
                localThreadPool.shutdownNow();
View Full Code Here

TOP

Related Classes of org.glassfish.grizzly.utils.DelayedExecutor$Worker

Copyright © 2018 www.massapicom. 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.