Examples of offer()


Examples of EDU.oswego.cs.dl.util.concurrent.Slot.offer()

       
        final MessageListener bean = new MessageListener() {
            public void onMessage(Message message) {
                System.out.println(message);
                try {
                    messageSlot.offer(message, 1000);
                } catch (InterruptedException e) {
                }
            }           
        };
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.helper.ReplyProcessQueue.offer()

        // 第一次/出现ROLLBACK/RESTART事件,删除了所有调度信号后,重新初始化一下select stage的数据,初始大小为并行度大小
        // 后续的select的reply队列变化,由load single时直接添加
        ReplyProcessQueue queue = replys.get(StageType.SELECT);
        int parallelism = ArbitrateConfigUtils.getParallelism(getPipelineId());
        while (parallelism-- > 0 && queue.size() <= parallelism) {
            queue.offer(atomicMaxProcessId.incrementAndGet());
        }
    }

    /**
     * 计算下一个load的processId
 
View Full Code Here

Examples of com.browseengine.bobo.util.IntBoundedPriorityQueue.offer()

          for (int i=1;i<countlength;++i)
          {
            int hits=count.get(i);
            if (hits>=minCount)
            {
              pq.offer(i);
            }
          }

          int val;
          while((val = pq.pollInt()) != forbidden)
View Full Code Here

Examples of com.browseengine.bobo.util.IntBoundedPriorityQueue.offer()

          for (int i=1;i<_countlength;++i) // exclude zero
          {
            int hits=_count.get(i);
            if (hits>=minCount)
            {
              if(!pq.offer(i))
              {
                // pq is full. we can safely ignore any facet with <=hits.
                minCount = hits + 1;
              }
            }
View Full Code Here

Examples of com.browseengine.bobo.util.IntBoundedPriorityQueue.offer()

         
          final int forbidden = -1;
          IntBoundedPriorityQueue pq=new IntBoundedPriorityQueue(comparator, maxNumOfFacets, forbidden);
          for (int i=0; i<_predefinedRangeIndexes.length; ++i)
          {
            if (rangeCount.get(i)>=minCount)   pq.offer(i);
          }

          int val;
          facetColl=new LinkedList<BrowseFacet>();
          while((val = pq.pollInt()) != forbidden)
View Full Code Here

Examples of com.browseengine.bobo.util.IntBoundedPriorityQueue.offer()

          for (int i=1;i<countlength;++i)
          {
            int hits=count[i];
            if (hits>=minCount)
            {
              pq.offer(i);
            }
          }

          int val;
          while((val = pq.pollInt()) != forbidden)
View Full Code Here

Examples of com.browseengine.bobo.util.IntBoundedPriorityQueue.offer()

         
          final int forbidden = -1;
          IntBoundedPriorityQueue pq=new IntBoundedPriorityQueue(comparator, maxNumOfFacets, forbidden);
          for (int i=0; i<_predefinedRangeIndexes.length; ++i)
          {
            if (rangeCount[i]>=minCount)   pq.offer(i);
          }

          int val;
          facetColl=new LinkedList<BrowseFacet>();
          while((val = pq.pollInt()) != forbidden)
View Full Code Here

Examples of com.browseengine.bobo.util.IntBoundedPriorityQueue.offer()

          for (int i=1;i<_countlength;++i) // exclude zero
          {
            int hits=_count[i];
            if (hits>=minCount)
            {
              if(!pq.offer(i))
              {
                // pq is full. we can safely ignore any facet with <=hits.
                minCount = hits + 1;
              }
            }
View Full Code Here

Examples of com.clearspring.analytics.stream.cardinality.ICardinality.offer()

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        String line = null;
        while((line = in.readLine()) != null)
        {           
            card.offer(line);
            count++;
           
            if(updateRate > 0 && count % updateRate == 0)
            {
                System.out.println(formatSummary(count, card.cardinality()));
View Full Code Here

Examples of com.clearspring.analytics.stream.quantile.QDigest.offer()

            TreeDigest dist = new TreeDigest(compression);
            List<Double> data = Lists.newArrayList();
            for (int i = 0; i < 100000; i++) {
                double x = gen.nextDouble();
                dist.add(x);
                qd.offer((long) (x * scale));
                data.add(x);
            }
            dist.compress();
            Collections.sort(data);

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.