Examples of poll()


Examples of EDU.oswego.cs.dl.util.concurrent.LinkedQueue.poll()

            try {
               while (true) {
                  LinkedQueue updQueue = cb.getUpdateQueue();
                  if (updQueue == null)
                     throw new XmlBlasterException(glob, ErrorCode.COMMUNICATION_NOCONNECTION_CALLBACKSERVER_NOTAVAILABLE, ME, "The callback is shutdown");
                  UpdateEvent ue = (UpdateEvent)updQueue.poll(this.waitTime);
                  if (ue != null) {
                     String methodName = ue.getMethod();
                     long refId = ue.getUniqueId();
                     ret[0] = methodName;
                     ret[1] = "" + refId;
View Full Code Here

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

      MessageProducer prod = session2.createProducer(topic);
      Message m = session.createTextMessage("blah");

      prod.send(m);

      TextMessage rm = (TextMessage)slot.poll(5000);

      assertEquals("blah", rm.getText());

      // Only for JBoss Remoting > 2.0.0.Beta1
      long sleepTime = ServerInvoker.DEFAULT_TIMEOUT_PERIOD + 60000;
View Full Code Here

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

      // this message to the MessageCallbackHandler, and the test will fail

      Message m2 = session.createTextMessage("blah2");
      prod.send(m2);

      TextMessage rm2 = (TextMessage)slot.poll(5000);

      assertNotNull(rm2);
      assertEquals("blah2", rm2.getText());

      conn.close();
View Full Code Here

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

      TextMessage m = session.createTextMessage("message one");

      prod.send(m);

      TextMessage rm = (TextMessage)slot.poll(5000);

      assertEquals("message one", rm.getText());

      conn.close();
   }
View Full Code Here

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

      MessageProducer prod = session.createProducer(queue);
      prod.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
      TextMessage m = session.createTextMessage("one");
      prod.send(m);

      TextMessage rm = (TextMessage)slot.poll(5000);

      assertEquals("one", rm.getText());

      conn.close();
   }
View Full Code Here

Examples of co.cask.cdap.data2.transaction.stream.StreamConsumer.poll()

  @Override
  public InputDatum<T> dequeue(long timeout, TimeUnit timeoutUnit) throws IOException, InterruptedException {
    StreamConsumer consumer = consumerSupplier.get();
    return new BasicInputDatum<StreamEvent, T>(consumer.getStreamName(),
                                               consumer.poll(batchSize, timeout, timeoutUnit), eventTransform);
  }
}
View Full Code Here

Examples of com.googlecode.flaxcrawler.concurrent.BerkleyQueue.poll()

            for (int i = 0; i < 1000; i++) {
                queue.add(new TestTask("tratatatat"));
            }

            for (int i = 0; i < 1000; i++) {
                Object obj = queue.poll();
                assertNotNull(obj);
            }

            assertNull(queue.poll());
        } finally {
View Full Code Here

Examples of com.hazelcast.core.IQueue.poll()

            }
        }, 1);
        addOperation(operations, new Runnable() {
            public void run() {
                IQueue q = hazelcast.getQueue("myQ");
                q.poll();
            }
        }, 10);
        addOperation(operations, new Runnable() {
            public void run() {
                IQueue q = hazelcast.getQueue("myQ");
View Full Code Here

Examples of com.hazelcast.core.TransactionalQueue.poll()

    public Object innerCall() throws Exception {
        final ClientEndpoint endpoint = getEndpoint();
        final TransactionContext context = endpoint.getTransactionContext(txnId);
        final TransactionalQueue queue = context.getQueue(name);
        return queue.poll(timeout, TimeUnit.MILLISECONDS);
    }

    public String getServiceName() {
        return QueueService.SERVICE_NAME;
    }
View Full Code Here

Examples of com.netflix.servo.publish.JmxMetricPoller.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
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.