Package org.jboss.threads

Examples of org.jboss.threads.JBossThreadFactory$ThreadSequenceInfo


        if (relativeTo != null) {
            RelativePathService.addService(pathService, path, relativeTo, serviceTarget);
        } else {
            AbsolutePathService.addService(pathService, path, serviceTarget);
        }
        final ThreadFactory threadFactory = new JBossThreadFactory(new ThreadGroup("DeploymentScanner-threads"), Boolean.FALSE, null, "%G - %t", null, null, AccessController.getContext());
        final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(2, threadFactory);

        ServiceBuilder builder = serviceTarget.addService(serviceName, service)
                .addDependency(pathService, String.class, service.pathValue)
                .addDependency(Services.JBOSS_SERVER_CONTROLLER, ModelController.class, service.controllerValue)
View Full Code Here


    private void initializeExecutorService(ServerEnvironment serverEnvironment) {
        if (serverEnvironment.isAllowModelControllerExecutor()) {
            final ThreadGroup threadGroup = new ThreadGroup("ModelController ThreadGroup");
            final String namePattern = "ServerService Thread Pool -- %t";
            final ThreadFactory threadFactory = new JBossThreadFactory(threadGroup, Boolean.FALSE, null, namePattern, null, null, AccessController.getContext());
            queuelessExecutor = new ThreadPoolExecutor(0, Integer.MAX_VALUE,
                                      5L, TimeUnit.SECONDS,
                                      new SynchronousQueue<Runnable>(),
                                      threadFactory);
            getExecutorServiceInjector().inject(queuelessExecutor);
View Full Code Here

        interpreter.setServerName(serverEnvironment.getServerName());
        return interpreter.collect();
    }

    public synchronized void start(StartContext context) throws StartException {
        final ThreadFactory threadFactory = new JBossThreadFactory(new ThreadGroup("JdrReportCollector-threads"), Boolean.FALSE, null, "%G - %t", null, null, AccessController.getContext());
        executorService = Executors.newCachedThreadPool(threadFactory);
        serverEnvironment = serverEnvironmentValue.getValue();
        controllerClient = modelControllerValue.getValue().createClient(executorService);
    }
View Full Code Here

    }

    protected AsynchronousService(boolean startAsynchronously, boolean stopAsynchronously) {
        this.startAsynchronously = startAsynchronously;
        this.stopAsynchronously = stopAsynchronously;
        final ThreadFactory factory =  new JBossThreadFactory(new ThreadGroup(String.format("%s lifecycle", this.getClass().getSimpleName())),
                Boolean.FALSE, null, "%G - %t", null, null, AccessController.getContext());
        this. executor = Executors.newCachedThreadPool(factory);
    }
View Full Code Here

        final ExtensibleConfigurationPersister persister = configuration.getConfigurationPersister();

        // TODO consider injecting the executor service
        final ThreadGroup threadGroup = new ThreadGroup("ServerController-threads");
        ThreadFactory threadFactory = new JBossThreadFactory(threadGroup, Boolean.FALSE, null, null, null, null, AccessController.getContext());
        final ExecutorService executorService = Executors.newScheduledThreadPool(DEFAULT_POOL_SIZE, threadFactory);
        final ServerControllerImpl serverController = new ServerControllerImpl(container, serviceTarget, serverEnvironment, persister, injectedDeploymentRepository.getValue(), executorService);
        serverController.init();

        final List<ModelNode> updates;
View Full Code Here

    }

    @Override
    public void start(StartContext context) throws StartException {
        try {
            final JBossThreadFactory threadFactory = new JBossThreadFactory(new ThreadGroup("ServerDeploymentRepository-temp-threads"), Boolean.FALSE, null, "%G - %t", null, null, AccessController.getContext());
            tempFileProvider = TempFileProvider.create("temp", Executors.newScheduledThreadPool(2, threadFactory));
        } catch (IOException e) {
            throw new StartException("Failed to create temp file provider");
        }
        log.debugf("%s started", ServerDeploymentRepository.class.getSimpleName());
View Full Code Here

    private void initializeExecutorService(ServerEnvironment serverEnvironment) {
        if (serverEnvironment.isAllowModelControllerExecutor()) {
            final ThreadGroup threadGroup = new ThreadGroup("ModelController ThreadGroup");
            final String namePattern = "ServerService Thread Pool -- %t";
            final ThreadFactory threadFactory = new JBossThreadFactory(threadGroup, Boolean.FALSE, null, namePattern, null, null, AccessController.getContext());
            queuelessExecutor = new ThreadPoolExecutor(0, Integer.MAX_VALUE,
                                      5L, TimeUnit.SECONDS,
                                      new SynchronousQueue<Runnable>(),
                                      threadFactory);
            getExecutorServiceInjector().inject(queuelessExecutor);
View Full Code Here

        final ProtocolServer.Configuration configuration = new ProtocolServer.Configuration();
        InetAddress pcInetAddress = InetAddress.getByName(pcSocketConfig.getBindAddress());
        InetSocketAddress pcInetSocketAddress = new InetSocketAddress(pcInetAddress, pcSocketConfig.getBindPort());
        configuration.setBindAddress(pcInetSocketAddress);
        configuration.setSocketFactory(ServerSocketFactory.getDefault());
        final ThreadFactory threadFactory = new JBossThreadFactory(new ThreadGroup("ProcessController-threads"), Boolean.FALSE, null, "%G - %t", null, null, AccessController.getContext());
        configuration.setThreadFactory(threadFactory);
        configuration.setReadExecutor(Executors.newCachedThreadPool(threadFactory));

        final ProcessController processController = new ProcessController(configuration, System.out, System.err);
        final InetSocketAddress boundAddress = processController.getServer().getBoundAddress();
View Full Code Here

        if (relativeTo != null) {
            RelativePathService.addService(pathService, path, false, relativeTo, serviceTarget, newControllers, listeners);
        } else {
            AbsolutePathService.addService(pathService, path, serviceTarget, newControllers, listeners);
        }
        final ThreadFactory threadFactory = new JBossThreadFactory(new ThreadGroup("DeploymentScanner-threads"), Boolean.FALSE, null, "%G - %t", null, null, AccessController.getContext());
        final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(2, threadFactory);

        ServiceBuilder builder = serviceTarget.addService(serviceName, service)
                .addDependency(pathService, String.class, service.pathValue)
                .addDependency(Services.JBOSS_SERVER_CONTROLLER, ModelController.class, service.controllerValue)
View Full Code Here

        interpreter.setControllerClient(controllerClient);
        return interpreter.collect();
    }

    public synchronized void start(StartContext context) throws StartException {
        final ThreadFactory threadFactory = new JBossThreadFactory(new ThreadGroup("JdrReportCollector-threads"), Boolean.FALSE, null, "%G - %t", null, null, AccessController.getContext());
        executorService = Executors.newCachedThreadPool(threadFactory);
        serverEnvironment = serverEnvironmentValue.getValue();
        controllerClient = modelControllerValue.getValue().createClient(executorService);
    }
View Full Code Here

TOP

Related Classes of org.jboss.threads.JBossThreadFactory$ThreadSequenceInfo

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.