Examples of ThreadPoolManager


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

            }
            if ( this.logger.isDebugEnabled() ) {
                this.logger.debug(PREFIX + "stopped.");
            }
        }
        final ThreadPoolManager tpm = this.threadPoolManager;
        if ( tpm != null && this.threadPool != null ) {
            tpm.release(this.threadPool);
        }
        this.threadPool = null;
    }
View Full Code Here

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

    private static Scheduler getSingletonScheduler() throws Exception {
      if (singletonScheduler!=null) {
        return singletonScheduler;
      }
        final Scheduler newscheduler = new QuartzScheduler();
        final ThreadPoolManager tpm = new DefaultThreadPoolManager(null, null);
        try {
          PrivateAccessor.invoke(newscheduler, "bindThreadPoolManager",
              new Class[] { ThreadPoolManager.class },
              new Object[] { tpm });
        } catch (Throwable e1) {
View Full Code Here

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

        this.context = null;
    }

    protected void init() throws SchedulerException {
        // if we don't have a thread pool manager, we use the default thread pool
        final ThreadPoolManager tpm = this.threadPoolManager;
        if ( tpm == null ) {
            final SchedulerFactory factory = new StdSchedulerFactory();
            this.scheduler = factory.getScheduler();
        } else {
            final ThreadPool pool = tpm.get(THREAD_POOL_NAME);
            final QuartzThreadPool quartzPool = new QuartzThreadPool(pool);
            final DirectSchedulerFactory factory = DirectSchedulerFactory.getInstance();
            factory.createScheduler(quartzPool, new RAMJobStore());
            this.scheduler = factory.getScheduler();
        }
View Full Code Here

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

        this.context = null;
    }

    protected void init() throws SchedulerException {
        // if we don't have a thread pool manager, we use the default thread pool
        final ThreadPoolManager tpm = this.threadPoolManager;
        if ( tpm == null ) {
            final SchedulerFactory factory = new StdSchedulerFactory();
            this.scheduler = factory.getScheduler();
        } else {
            final ThreadPool pool = tpm.get(THREAD_POOL_NAME);
            final QuartzThreadPool quartzPool = new QuartzThreadPool(pool);
            final DirectSchedulerFactory factory = DirectSchedulerFactory.getInstance();
            factory.createScheduler(quartzPool, new RAMJobStore());
            this.scheduler = factory.getScheduler();
        }
View Full Code Here

Examples of org.apache.stratum.jcs.utils.threads.ThreadPoolManager

    /** Multi-casts the deltes to the distributed servers. */
    public void multicast()
    {

        ThreadPoolManager tpm = ThreadPoolManager.getInstance();
        Iterator it = servers.iterator();
        //p( "iterating through servers" );
        while ( it.hasNext() )
        {
            String url = ( String ) it.next() + servlet;
            //p( "url = " + url );
            tpm.runIt( new DeleteLateralCacheUnicaster( hashtableName, key, url ) );
        }
        return;
    }
View Full Code Here

Examples of org.apache.stratum.jcs.utils.threads.ThreadPoolManager

    /** Multi-casts the cache changes to the distributed servers. */
    public void multicast()
    {

        ThreadPoolManager tpm = ThreadPoolManager.getInstance();
        Iterator it = servers.iterator();
        while ( it.hasNext() )
        {
            tpm.runIt( new LateralCacheUnicaster( ice, ( String ) it.next() + servlet ) );
        }
        return;
    }
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.