Examples of poll()


Examples of org.jboss.errai.bus.server.api.MessageQueue.poll()

        queue.setActivationCallback(new QueueActivationCallback() {
          @Override
          public void activate(final MessageQueue queue) {
            try {
              queue.setActivationCallback(null);
              queue.poll(writer);

              writer.write(SSE_TERMINATION_BYTES);

              queue.heartBeat();
              writer.flush();
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.poll()

          }
        });

      synchronized (queue.getActivationLock()) {
        if (queue.messagesWaiting()) {
          queue.poll(writer);
          asyncContext.complete();
          return;
        }

        queue.setActivationCallback(new QueueActivationCallback() {
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.poll()

        queue.setActivationCallback(new QueueActivationCallback() {
          @Override
          public void activate(final MessageQueue queue) {
            try {
              queue.poll(writer);
              queue.setActivationCallback(null);

              queue.heartBeat();
              writer.flush();
            }
View Full Code Here

Examples of org.mule.util.queue.Queue.poll()

        List<MuleMessage> messages = new LinkedList<MuleMessage>();

        int batchSize = getBatchSize(queue.size());

        // try to get the first event off the queue
        MuleEvent message = (MuleEvent) queue.poll(connector.getQueueTimeout());

        if (message != null)
        {
            // keep first dequeued event
            messages.add(message.getMessage());
View Full Code Here

Examples of org.uberfire.java.nio.file.WatchService.poll()

        final WatchService ws = init.getFileSystem().newWatchService();

        ioService.write( init, "init!", new CommentedOption( "User Tester", "message1" ) );
        ioService.write( init, "init 2!", new CommentedOption( "User Tester", "message2" ) );
        {
            List<WatchEvent<?>> events = ws.poll().pollEvents();
            assertEquals( 1, events.size() );//modify readme
        }

        final Path init2 = ioService.get( URI.create( "git://amend-repo-test/readme2.txt" ) );
        ioService.write( init2, "init 3!", new CommentedOption( "User Tester", "message3" ) );
View Full Code Here

Examples of org.zeromq.ZMQ.Poller.poll()

        Poller poller = new ZMQ.Poller(1);
        Socket socketOne = context.socket(ZMQ.SUB);

        poller.register(socketOne, ZMQ.Poller.POLLIN);
        socketOne.close();
        poller.poll(100);

        context.term();
    }

    @Test
View Full Code Here

Examples of us.codecraft.webmagic.scheduler.Scheduler.poll()

        checkIfRunning();
        Scheduler oldScheduler = this.scheduler;
        this.scheduler = scheduler;
        if (oldScheduler != null) {
            Request request;
            while ((request = oldScheduler.poll(this)) != null) {
                this.scheduler.push(request, this);
            }
        }
        return this;
    }
View Full Code Here

Examples of utils.Keyboard.poll()

    Timer timer = new Timer();
    int frames = 0, prevFrames = 0;
    int timePassed = 0;
    timer.start();
    while( true ) {
      kb.poll();
      if( kb.keyDown( KeyEvent.VK_Q ) ) {
        break;
      }
      if( kb.keyDown( KeyEvent.VK_A ) ) {
        Point2D tempPoint = new Point2D( rand.nextInt( window.getWidth() ), rand.nextInt( window.getHeight() ) );
View Full Code Here

Examples of xbird.engine.XQEngine.poll()

        XQEngine engine = new XQEngineClient("//" + bindHost + ":1099/xbird/srv-01");

        QueryRequest request1 = new QueryRequest("1+2", ReturnType.STRING);
        request1.setReplyPattern(ReplyPattern.POLL);
        // not send
        Assert.assertNull(engine.poll(request1));
        // send#1
        Assert.assertNull(engine.execute(request1));
        // poll#1            
        Thread.sleep(3000);
        Assert.assertEquals("3", engine.poll(request1));
View Full Code Here

Examples of xbird.engine.XQEngine.poll()

        Assert.assertNull(engine.poll(request1));
        // send#1
        Assert.assertNull(engine.execute(request1));
        // poll#1            
        Thread.sleep(3000);
        Assert.assertEquals("3", engine.poll(request1));
        // after polled
        Assert.assertNull(engine.poll(request1));
        // send#2
        QueryRequest request2 = new QueryRequest("1+4");
        request2.setReplyPattern(ReplyPattern.POLL);
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.