Examples of ThreadPoolConfig


Examples of com.sun.appserv.management.config.ThreadPoolConfig

    }
   
      public static ThreadPoolConfig
  ensureDefaultInstance( final ConfigConfig cc )
  {
      ThreadPoolConfig result = cc.getThreadPoolConfigMap().get( getDefaultInstanceName() );
     
      if ( result == null )
      {
          result  = createInstance( cc, getDefaultInstanceName(), OPTIONAL);
      }
View Full Code Here

Examples of com.sun.appserv.management.config.ThreadPoolConfig

        boolean hasOrig = (selectedList == null || selectedList.size()==0) ? false: true;
      
        List result = new ArrayList();
        if (iter != null){
            while(iter.hasNext()){
                ThreadPoolConfig threadConfig = (ThreadPoolConfig) iter.next();
                HashMap oneRow = new HashMap();
                String name = threadConfig.getThreadPoolId();
                oneRow.put("name", name);
                oneRow.put("selected", (hasOrig)? ConnectorsHandlers.isSelected(name, selectedList): false);
                String maxSize = threadConfig.getMaxThreadPoolSize();
                String minSize = threadConfig.getMinThreadPoolSize();
                oneRow.put("maxSize", (maxSize == null) ? " ": maxSize);
                oneRow.put("minSize", (minSize == null) ? " ": minSize);
                result.add(oneRow);
            }
        }
View Full Code Here

Examples of com.sun.appserv.management.config.ThreadPoolConfig

            getDefaultThreadPoolValues(handlerCtx);
            return;
        }
        String threadPoolId = (String)handlerCtx.getInputValue("ThreadPoolId");
        Map threadPoolsMap = config.getThreadPoolConfigMap();
        ThreadPoolConfig threadConfig = (ThreadPoolConfig)threadPoolsMap.get(threadPoolId);
        String minPoolSize = threadConfig.getMinThreadPoolSize();
        String maxPoolSize = threadConfig.getMaxThreadPoolSize();
        String idleTimeout = threadConfig.getIdleThreadTimeoutInSeconds();
        String noWorkQ = threadConfig.getNumWorkQueues();
       
        handlerCtx.setOutputValue("MinPoolSize", minPoolSize);
        handlerCtx.setOutputValue("MaxPoolSize", maxPoolSize);
        handlerCtx.setOutputValue("IdleTimeout", idleTimeout);
        handlerCtx.setOutputValue("NoWorkQ", noWorkQ);
View Full Code Here

Examples of com.sun.appserv.management.config.ThreadPoolConfig

        public static void saveThreadPoolValues(HandlerContext handlerCtx) {
        String configName = (String) handlerCtx.getInputValue("ConfigName");
        ConfigConfig config = AMXUtil.getConfig(configName);
        String threadPoolId = (String)handlerCtx.getInputValue("ThreadPoolId");
        try{
            ThreadPoolConfig threadConfig = null;
            Boolean edit = (Boolean) handlerCtx.getInputValue("Edit");
            if(!edit){
                threadConfig = config.createThreadPoolConfig(threadPoolId, new HashMap());
            } else {
                Map threadPoolsMap = config.getThreadPoolConfigMap();
                threadConfig = (ThreadPoolConfig)threadPoolsMap.get(threadPoolId);
            }
            threadConfig.setMinThreadPoolSize((String)handlerCtx.getInputValue("MinPoolSize"));
            threadConfig.setMaxThreadPoolSize((String)handlerCtx.getInputValue("MaxPoolSize"));
            threadConfig.setIdleThreadTimeoutInSeconds((String)handlerCtx.getInputValue("IdleTimeout"));
            threadConfig.setNumWorkQueues((String)handlerCtx.getInputValue("NoWorkQ"));
        }catch (Exception ex){
            GuiUtil.handleException(handlerCtx, ex);
        }
    }
View Full Code Here

Examples of com.sun.grizzly.util.ThreadPoolConfig

                    monitoring.getConnectionQueueStatsProvider(monitoringId);
            if (statsProvider != null) {
                statsProvider.setStatsObject(this);
            }

            ThreadPoolConfig config = getConfiguration();

            // force related events to be fired though the values aren't
            // changing.
            config.setCorePoolSize(config.getCorePoolSize());
            config.setMaxPoolSize(config.getMaxPoolSize());
            config.setQueueLimit(config.getQueueLimit());

        }

    }
View Full Code Here

Examples of com.sun.grizzly.util.ThreadPoolConfig

                    monitoring.getConnectionQueueStatsProvider(monitoringId);
            if (statsProvider != null) {
                statsProvider.setStatsObject(this);
            }

            ThreadPoolConfig config = getConfiguration();

            // force related events to be fired though the values aren't
            // changing.
            config.setCorePoolSize(config.getCorePoolSize());
            config.setMaxPoolSize(config.getMaxPoolSize());
            config.setQueueLimit(config.getQueueLimit());

        }

    }
View Full Code Here

Examples of org.apache.sling.commons.threads.ThreadPoolConfig

            throw new ConfigurationException(ModifiableThreadPoolConfig.PROPERTY_NAME, "Property is missing or empty.");
        }
        this.logger.debug("Updating {} with {}", pid, properties);
        Entry createdEntry = null;
        synchronized ( this.pools ) {
            final ThreadPoolConfig config = this.createConfig(properties);

            Entry foundEntry = null;
            // we have to search the config by using the pid first!
            for (final Entry entry : this.pools.values()) {
                if ( pid.equals(entry.getPid()) ) {
View Full Code Here

Examples of org.apache.sling.commons.threads.ThreadPoolConfig

        pw.println(HEADLINE);
        pw.println();
        final DefaultThreadPoolManager.Entry[] configs = this.mgr.getConfigurations();
        if ( configs.length > 0 ) {
            for(final DefaultThreadPoolManager.Entry entry : configs ) {
                final ThreadPoolConfig config = entry.getConfig();
                pw.print("Pool ");
                pw.println(entry.getName());
                if ( entry.getPid() != null ) {
                    pw.print("- from configuration : ");
                    pw.println(entry.getPid());
                }
                pw.print("- used : ");
                pw.println(entry.isUsed());
                pw.print("- min pool size : ");
                pw.println(config.getMinPoolSize());
                pw.print("- max pool size : ");
                pw.println(config.getMaxPoolSize());
                pw.print("- queue size : ");
                pw.println(config.getQueueSize());
                pw.print("- keep alive time : ");
                pw.println(config.getKeepAliveTime());
                pw.print("- block policy : ");
                pw.println(config.getBlockPolicy());
                pw.print("- priority : ");
                pw.println(config.getPriority());
                pw.print("- shutdown graceful : ");
                pw.println(config.isShutdownGraceful());
                pw.print("- shutdown wait time : ");
                pw.println(config.getShutdownWaitTimeMs());
                pw.print("- daemon : ");
                pw.println(config.isDaemon());
                final ThreadPoolExecutor tpe = entry.getExecutor();
                if ( tpe != null ) {
                    pw.print("- active count : ");
                    pw.println(tpe.getActiveCount());
                    pw.print("- completed task count : ");
View Full Code Here

Examples of org.apache.sling.commons.threads.ThreadPoolConfig

            this.name = name;
        } else {
            this.name = DefaultThreadPoolManager.DEFAULT_THREADPOOL_NAME;
        }

        this.configuration = new ThreadPoolConfig(origConfig);

        // factory
        final ThreadFactory delegateThreadFactory;
        if (this.configuration.getFactory() == null) {
            logger.warn("No ThreadFactory is configured. Will use JVM default thread factory."
View Full Code Here

Examples of org.apache.sling.commons.threads.ThreadPoolConfig

        public void shutdown() {
            // nothing to do
        }

        public ThreadPoolConfig getConfiguration() {
            return new ThreadPoolConfig();
        }
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.