Examples of poll()


Examples of com.netflix.servo.publish.MetricPoller.poll()

        MetricPoller poller = new JmxMetricPoller(new LocalJmxConnector(),
                new ObjectName("java.lang:type=OperatingSystem"), MATCH_NONE);

        RegexMetricFilter filter = new RegexMetricFilter(null,
                Pattern.compile(name), false, false);
        List<Metric> metrics = poller.poll(filter);
        assertEquals(metrics.size(), 1);
        return metrics.get(0);
    }
}
View Full Code Here

Examples of com.netflix.suro.input.thrift.MessageSetProcessor.poll()

        TMessageSet messageSet = TestConnectionPool.createMessageSet(100);
        assertEquals(queue.process(messageSet).getResultCode(), ResultCode.OK);

        assertEquals(queue.getQueueSize(), 1);
        assertEquals(queue.poll(1, TimeUnit.MILLISECONDS), messageSet);
        assertEquals(queue.getQueueSize(), 0);

        queue.stopTakingTraffic();
        assertEquals(queue.process(messageSet).getResultCode(), ResultCode.OTHER_ERROR);
View Full Code Here

Examples of com.opengamma.engine.view.execution.ViewCycleExecutionSequence.poll()

  private synchronized void spawnWorker() {
    ViewCycleExecutionSequence sequence = getSequence();
    final int partitionSize = getPartitionSize();
    final List<ViewCycleExecutionOptions> partition = new ArrayList<ViewCycleExecutionOptions>(partitionSize);
    for (int i = 0; i < partitionSize; i++) {
      final ViewCycleExecutionOptions step = sequence.poll(getDefaultExecutionOptions());
      if (step != null) {
        partition.add(step);
      } else {
        break;
      }
View Full Code Here

Examples of com.vividsolutions.jts.util.PriorityQueue.poll()

    // initialize queue
    priQ.add(initBndPair);

    while (! priQ.isEmpty() && distanceLowerBound > 0.0) {
      // pop head of queue and expand one side of pair
      BoundablePair bndPair = (BoundablePair) priQ.poll();
      double currentDistance = bndPair.getDistance();
     
      /**
       * If the distance for the first node in the queue
       * is >= the current minimum distance, all other nodes
View Full Code Here

Examples of de.scoopgmbh.copper.test.backchannel.BackChannelQueue.poll()

      }

      int x=0;
      long startTS = System.currentTimeMillis();
      while (x < NUMB && startTS+60000 > System.currentTimeMillis()) {
        WorkflowResult wfr = backChannelQueue.poll();
        if (wfr != null) {
          assertNull(wfr.getResult());
          assertNull(wfr.getException());
          x++;
        }
View Full Code Here

Examples of edu.emory.mathcs.backport.java.util.Queue.poll()

        Queue queue = getQueue();
        queue.add(event); // enqueue

        if (queue.size() == 1) {
            event.run();
            queue.poll(); // dequeue current runnable
            for (Runnable task = null; (task = (Runnable) queue.peek()) != null; queue
                    .poll())
                task.run();
        }
    }
View Full Code Here

Examples of hudson.scm.SCM.poll()

                    Launcher launcher = ws.createLauncher(listener);
                    try {
                        LOGGER.fine("Polling SCM changes of " + getName());
                        if (pollingBaseline==null) // see NOTE-NO-BASELINE above
                            calcPollingBaseline(lb,launcher,listener);
                        PollingResult r = scm.poll(this, launcher, ws, listener, pollingBaseline);
                        pollingBaseline = r.remote;
                        return r;
                    } finally {
                        lease.release();
                    }
View Full Code Here

Examples of io.thp.psmove.PSMove.poll()

        float [] ax = { 0.f }, ay = { 0.f }, az = { 0.f };
        float [] gx = { 0.f }, gy = { 0.f }, gz = { 0.f };
        float [] mx = { 0.f }, my = { 0.f }, mz = { 0.f };

        while (true) {
            while (move.poll() != 0) {
                move.get_accelerometer_frame(Frame.Frame_SecondHalf,
                        ax, ay, az);
                move.get_gyroscope_frame(Frame.Frame_SecondHalf,
                        gx, gy, gz);
                move.get_magnetometer_vector(mx, my, mz);
View Full Code Here

Examples of java.lang.ref.ReferenceQueue.poll()

      /**now its up to the referencequeue to remove the
       * appropiate obects.
       */
      CacheObject cacheObj = null;
            ReferenceQueue q = cache.getReferenceQueue();
        while ((cacheObj = (CacheObject) q.poll()) != null) {
        cacheObj.resetRefCount();
        tryRemoval(cacheObj);
      }

    } catch (CacheException e) {
View Full Code Here

Examples of java.lang.ref.ReferenceQueue.poll()

    private void cleanup() {
        // Cleanup after cleared References.
        Entry[] tab = this.table;
        ReferenceQueue queue = this.queue;
        Reference ref;
        while ((ref = queue.poll()) != null) {
            // Since buckets are single-linked, traverse entire list and
            // cleanup all cleared references in it.
            int index = (((Entry) ref).hash & 0x7fffffff) % tab.length;
            for (Entry e = tab[index], prev = null; e != null; e = e.next) {
                if (e.get() == null) {
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.