Package EDU.oswego.cs.dl.util.concurrent

Examples of EDU.oswego.cs.dl.util.concurrent.Channel


    public ThreadPoolWorkflowEngine(WorkflowInstanceRepository instRep,
            int queueSize, int maxPoolSize, int minPoolSize,
            long threadKeepAliveTime, boolean unlimitedQueue, URL resUrl) {

        this.instRep = instRep;
        Channel c = null;
        if (unlimitedQueue) {
            c = new LinkedQueue();
        } else {
            c = new BoundedBuffer(queueSize);
        }
View Full Code Here


    public NonBlockingThreadPoolWorkflowEngine(WorkflowInstanceRepository instRep,
            int queueSize, int maxPoolSize, int minPoolSize,
            long threadKeepAliveTime, boolean unlimitedQueue, URL resUrl) {

        this.instRep = instRep;
        Channel c = null;
        if (unlimitedQueue) {
            c = new LinkedQueue();
        } else {
            c = new BoundedBuffer(queueSize);
        }
View Full Code Here

  public ThreadPoolWorkflowEngine(WorkflowInstanceRepository instRep,
      int queueSize, int maxPoolSize, int minPoolSize,
      long threadKeepAliveTime, boolean unlimitedQueue, URL resUrl) {

    this.instRep = instRep;
    Channel c = null;
    if (unlimitedQueue) {
      c = new LinkedQueue();
    } else {
      c = new BoundedBuffer(queueSize);
    }
View Full Code Here

     * @return A ThreadPoll wrapper
     */
    private ThreadPool createPool( PoolConfiguration config )
    {
        PooledExecutor pool = null;
        Channel queue = null;
        if ( config.isUseBoundary() )
        {
            if ( log.isDebugEnabled() )
            {
                log.debug( "Creating a Bounded Buffer to use for the pool" );
View Full Code Here

                               int poolSize,
                               int backLog,
                               long timeout) {
        this.extractor = extractor;
        this.timout = timeout;
        Channel c;
        if (backLog <= 0) {
            c = new SynchronousChannel();
        } else {
            c = new BoundedLinkedQueue(backLog);
        }
View Full Code Here

                               int poolSize,
                               int backLog,
                               long timeout) {
        this.extractor = extractor;
        this.timout = timeout;
        Channel c;
        if (backLog <= 0) {
            c = new SynchronousChannel();
        } else {
            c = new BoundedLinkedQueue(backLog);
        }
View Full Code Here

                               int poolSize,
                               int backLog,
                               long timeout) {
        this.extractor = extractor;
        this.timout = timeout;
        Channel c;
        if (backLog <= 0) {
            c = new SynchronousChannel();
        } else {
            c = new BoundedLinkedQueue(backLog);
        }
View Full Code Here

  public ThreadPoolWorkflowEngine(WorkflowInstanceRepository instRep,
      int queueSize, int maxPoolSize, int minPoolSize,
      long threadKeepAliveTime, boolean unlimitedQueue, URL resUrl) {

    this.instRep = instRep;
    Channel c = null;
    if (unlimitedQueue) {
      c = new LinkedQueue();
    } else {
      c = new BoundedBuffer(queueSize);
    }
View Full Code Here

/* 1332 */               TestLoop l = new TestLoop(shared, pri, pshr, iters, barrier);
/* 1333 */               Threads.pool.execute(l.testLoop());
/*      */             }
/*      */           }
/*      */           else {
/* 1337 */             Channel shared = (Channel)chanCls.newInstance();
/* 1338 */             if (nthreads == 1) {
/* 1339 */               ChanRNG single = (ChanRNG)cls.newInstance();
/* 1340 */               single.setSingle(true);
/* 1341 */               PCTestLoop l = new PCTestLoop(single.getDelegate(), single, pshr,
/* 1342 */                 iters, barrier,
/* 1343 */                 shared, shared);
/* 1344 */               Threads.pool.execute(l.testLoop(true));
/*      */             } else {
/* 1346 */               if (nthreads % 2 != 0) {
/* 1347 */                 throw new Error("Must have even number of threads!");
/*      */               }
/* 1349 */               int npairs = nthreads / 2;
/*      */
/* 1351 */               for (int k = 0; k < npairs; k++) {
/* 1352 */                 ChanRNG t = (ChanRNG)cls.newInstance();
/* 1353 */                 t.setSingle(false);
/* 1354 */                 Channel chan = (Channel)chanCls.newInstance();
/*      */
/* 1356 */                 PCTestLoop l = new PCTestLoop(t.getDelegate(), t, pshr,
/* 1357 */                   iters, barrier,
/* 1358 */                   shared, chan);
/*      */
View Full Code Here

/* 1616 */             if (i % itersPerBarrier == 0) {
/* 1617 */               PCTestLoop.this.primary.exchange();
/*      */             }
/*      */             else
/*      */             {
/*      */               Channel c;
/*      */               Channel c;
/* 1621 */               if ((nshared > 0) && (PCTestLoop.this.useShared[(idx % PCTestLoop.this.useShared.length)] != 0)) {
/* 1622 */                 nshared--;
/* 1623 */                 c = PCTestLoop.this.sharedChannel;
/*      */               }
/*      */               else {
View Full Code Here

TOP

Related Classes of EDU.oswego.cs.dl.util.concurrent.Channel

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.