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

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


      return nodeEventQueue_.size();
   }

   public void resetEvictionQueues()
   {
      BoundedLinkedQueue q1 = nodeEventQueue_;
      log_.info("reseteEvictionQueues(): node queue size: " + q1.size() +
            " region name: " + fqn_);
      createQueue();
      // Help to recycle
      for (int i = 0; i < q1.size(); i++)
      {
         try
         {
            q1.take();
         }
         catch (InterruptedException e)
         {
            e.printStackTrace();
         }
View Full Code Here


   public BasicThreadPool(String name, ThreadGroup threadGroup)
   {
      trace = log.isTraceEnabled();
      ThreadFactory factory = new ThreadPoolThreadFactory();

      queue = new BoundedLinkedQueue(1024);

      executor = new MinPooledExecutor(queue, 100);
      executor.setMinimumPoolSize(4);
      executor.setKeepAliveTime(60 * 1000);
      executor.setThreadFactory(factory);
View Full Code Here

      if (s != null)
         returnOld = Boolean.valueOf(s).booleanValue();

      s = props.getProperty("cache.async.queueSize");
      if (s != null)
         queue = new BoundedLinkedQueue(Integer.parseInt(s));

      s = props.getProperty("cache.async.put");
      if (s != null)
         asyncPut = Boolean.valueOf(s).booleanValue();
View Full Code Here

            incoming_msg_handler=new IncomingMessageHandler();
            incoming_msg_handler.start();
        }

        if(use_outgoing_packet_handler) {
            outgoing_queue=new BoundedLinkedQueue(outgoing_queue_max_size);
            outgoing_packet_handler=new OutgoingPacketHandler();
            outgoing_packet_handler.start();
        }

        if(enable_bundling) {
View Full Code Here

    protected void keepAlivePing(HttpServerTransportChannel channel) {
        /** TODO */
    }

    protected HttpServerTransportChannel createTransportChannel() {
        return new HttpServerTransportChannel(new BoundedLinkedQueue(10));
    }
View Full Code Here

    protected TcpTransportChannel(WireFormat wireFormat) {
        this.wireFormat = wireFormat;
        closed = new SynchronizedBoolean(false);
        started = new SynchronizedBoolean(false);
        // there's not much point logging all exceptions, lets just keep a few around
        exceptionsList = new BoundedLinkedQueue(10);
        outboundLock = new Object();
        if (useAsyncSend) {
            executor = new PooledExecutor(new BoundedBuffer(1000), 1);
        }
    }
View Full Code Here

        this.sendChannel = sendChannel;
        this.receiveChannel = receiveChannel;
    }

    public VmTransportChannel(int capacity) {
        this(new BoundedLinkedQueue(capacity), new BoundedLinkedQueue(capacity));
    }
View Full Code Here

    protected static synchronized int getNextThreadId() {
        return lastThreadId++;
    }

    protected Channel createChannel(int capacity) {
        return new BoundedLinkedQueue(capacity);
    }
View Full Code Here

        super(wireFormat);
        this.wireFormatLoader = new WireFormatLoader(wireFormat);
        closed = new SynchronizedBoolean(false);
        started = new SynchronizedBoolean(false);
        // there's not much point logging all exceptions, lets just keep a few around
        exceptionsList = new BoundedLinkedQueue(10);
        outboundLock = new Object();
        setUseAsyncSend(useAsyncSend);
        super.setCachingEnabled(true);
    }
View Full Code Here

        super(wireFormat);
        this.wireFormatLoader = new WireFormatLoader(wireFormat);
        closed = new SynchronizedBoolean(false);
        started = new SynchronizedBoolean(false);
        // there's not much point logging all exceptions, lets just keep a few around
        exceptionsList = new BoundedLinkedQueue(10);
        outboundLock = new Object();
        if (useAsyncSend) {
            executor = new PooledExecutor(new BoundedBuffer(1000), 1);
        }
        super.setCachingEnabled(true);
View Full Code Here

TOP

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

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.