Package java.util.concurrent

Examples of java.util.concurrent.ArrayBlockingQueue


      frame.setResizable(true);
   }

   public InfinispanDemo(String cfgFileName) {
      asyncExecutor = Executors.newFixedThreadPool(1);
      tableUpdateExecutor = new ThreadPoolExecutor(1, 1, 0, TimeUnit.SECONDS, new ArrayBlockingQueue(1),
            new ThreadPoolExecutor.DiscardPolicy());

      cacheConfigFile = cfgFileName;
      cacheStatusProgressBar.setVisible(false);
      cacheStatusProgressBar.setEnabled(false);
View Full Code Here


    * Important: this *MUST* be called with WL on {@link #address2key}.
    */
   private void addQueuesForAddresses(Collection<Address> addresses) {
      for (Address address : addresses) {
         if (interestedInAddress(address)) {
            address2key.put(address, new ArrayBlockingQueue(bufferSize));
         } else {
            if (log.isTraceEnabled())
               log.trace("Skipping address: " + address);
         }
      }
View Full Code Here

    * Important: this *MUST* be called with WL on {@link #address2key}.
    */
   private void addQueuesForAddresses(Collection<Address> addresses) {
      for (Address address : addresses) {
         if (interestedInAddress(address)) {
            address2key.put(address, new ArrayBlockingQueue(bufferSize));
         } else {
            if (log.isTraceEnabled())
               log.tracef("Skipping address: %s", address);
         }
      }
View Full Code Here

    * Important: this *MUST* be called with WL on {@link #address2key}.
    */
   private void addQueuesForAddresses(Collection<Address> addresses) {
      for (Address address : addresses) {
         if (interestedInAddress(address)) {
            address2key.put(address, new ArrayBlockingQueue(bufferSize));
         } else {
            if (log.isTraceEnabled())
               log.trace("Skipping address: " + address);
         }
      }
View Full Code Here

      frame.setResizable(true);
   }

   public InfinispanDemo(String cfgFileName) {
      asyncExecutor = Executors.newFixedThreadPool(1);
      tableUpdateExecutor = new ThreadPoolExecutor(1, 1, 0, TimeUnit.SECONDS, new ArrayBlockingQueue(1),
            new ThreadPoolExecutor.DiscardPolicy());

      cacheConfigFile = cfgFileName;
      cacheStatusProgressBar.setVisible(false);
      cacheStatusProgressBar.setEnabled(false);
View Full Code Here

    this( DEFAULT_BUFF_LENGHT, producersToWaitFor );
  }

  @SuppressWarnings("unchecked")
  public ProducerConsumerQueue( int queueLenght, int producersToWaitFor ) {
    queue = new ArrayBlockingQueue( queueLenght );
    this.producersToWaitFor = new AtomicInteger( producersToWaitFor );
  }
View Full Code Here

    * Important: this *MUST* be called with WL on {@link #address2key}.
    */
   private void addQueuesForAddresses(Collection<Address> addresses) {
      for (Address address : addresses) {
         if (interestedInAddress(address)) {
            address2key.put(address, new ArrayBlockingQueue(bufferSize));
         } else {
            if (log.isTraceEnabled())
               log.tracef("Skipping address: %s", address);
         }
      }
View Full Code Here

        _arguments = arguments;
        _prefetchHigh = prefetchHigh;
        _prefetchLow = prefetchLow;
        _exclusive = exclusive;

        _synchronousQueue = new ArrayBlockingQueue(prefetchHigh, true);
        _autoClose = autoClose;
        _noConsume = noConsume;

        // Force queue browsers not to use acknowledge modes.
        if (_noConsume)
View Full Code Here

        _rawSelectorFieldTable = rawSelectorFieldTable;
        _prefetchHigh = prefetchHigh;
        _prefetchLow = prefetchLow;
        _exclusive = exclusive;
        _acknowledgeMode = acknowledgeMode;
        _synchronousQueue = new ArrayBlockingQueue(prefetchHigh, true);
        _autoClose = autoClose;
        _noConsume = noConsume;

        // Force queue browsers not to use acknowledge modes.
        if (_noConsume)
View Full Code Here

            return answer;
        }
    }

    protected BlockingQueueTransport createTransportChannel() {
        return new BlockingQueueTransport(new ArrayBlockingQueue(10));
    }
View Full Code Here

TOP

Related Classes of java.util.concurrent.ArrayBlockingQueue

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.