Examples of enqueue()


Examples of co.cask.cdap.data2.queue.QueueProducer.enqueue()

        try {
          txExecutor.execute(new TransactionExecutor.Subroutine() {
            @Override
            public void apply() throws Exception {
              for (StreamEvent event : events) {
                producer.enqueue(new QueueEntry(STREAM_EVENT_CODEC.encodePayload(event)));
              }
              events.clear();
            }
          });
        } catch (TransactionFailureException e) {
View Full Code Here

Examples of com.deitel.jhtp6.ch17.Queue.enqueue()

   public static void main( String args[] )
   {
      Queue queue = new Queue()

      // use enqueue method
      queue.enqueue( -1 );
      queue.print();
      queue.enqueue( 0 );
      queue.print();
      queue.enqueue( 1 );
      queue.print();
View Full Code Here

Examples of com.google.mockwebserver.MockWebServer.enqueue()

   @Test
   public void testMPUDoesMultipart() throws IOException, InterruptedException {
      MockWebServer server = new MockWebServer();
      AtomicReference<URL> url = setURLReplacingDispatcher(server);
      server.enqueue(new MockResponse().setResponseCode(200).setBody(authResponse));
      server.enqueue(new MockResponse().setResponseCode(200).addHeader("ETag", "a00"));
      server.enqueue(new MockResponse().setResponseCode(200).addHeader("ETag", "b00"));
      server.enqueue(new MockResponse().setResponseCode(200).addHeader("ETag", "fff"));
      server.play();
      url.set(server.getUrl("/"));
View Full Code Here

Examples of com.hazelcast.nio.ascii.SocketTextWriter.enqueue()

                        synchronized (stopObject) {
                            stopObject.notify();
                        }
                    } else {
                        SocketTextWriter socketTextWriter = textCommand.getSocketTextWriter();
                        socketTextWriter.enqueue(textCommand);
                    }
                } catch (InterruptedException e) {
                    return;
                } catch (OutOfMemoryError e) {
                    OutOfMemoryErrorDispatcher.onOutOfMemory(e);
View Full Code Here

Examples of com.jbidwatcher.util.queue.MessageQueue.enqueue()

  private void spinOffCompletedLoader(final AuctionServer newServer) {
    Thread completedHandler = new Thread() {
      public void run() {
        final MessageQueue tabQ = MQFactory.getConcrete("complete Tab");
        tabQ.enqueue("REPORT Importing completed listings");
        tabQ.enqueue("SHOW");

        timeStart("findEnded");
        List<AuctionEntry> entries = AuctionEntry.findEnded();//TODO EntryCorral these?
        timeStop("findEnded");
View Full Code Here

Examples of com.leansoft.bigqueue.BigQueueImpl.enqueue()

        inMemSort(stringArray);
        String newQueueName = getNextTempQueueName();
        IBigQueue newBigQueue = new BigQueueImpl(SAMPLE_DIR, newQueueName);
        // make sorted sub-queue
        for(String item : stringArray) {
          newBigQueue.enqueue(item.getBytes());
        }
        // put the sub-queue into output queue
        queueOfSortedQueues.offer(newBigQueue);
        newBigQueue.close();
       
View Full Code Here

Examples of com.leansoft.bigqueue.IBigQueue.enqueue()

      }
    }
   
    if (req.getData() != null && req.getData().length > 0) {
      try {
        bigQueue.enqueue(req.getData());
      } catch (IOException e) {
        resp.setResultCode(ResultCode.FAILURE);
        return resp;
      }
      resp.setResultCode(ResultCode.SUCCESS);
View Full Code Here

Examples of com.leansoft.bigqueue.IFanOutQueue.enqueue()

      foQueue = new FanOutQueueImpl("d:/tutorial/fanout-queue", "demo");
     
      // enqueue some logs
      for(int i = 0; i < 10; i++) {
        String log = "log-" + i;
        foQueue.enqueue(log.getBytes());
      }
     
      // consuming the queue with fanoutId 1
      String fanoutId1 = "realtime";
      System.out.println("output from " + fanoutId1 + " consumer:");
View Full Code Here

Examples of com.squareup.okhttp.mockwebserver.MockWebServer.enqueue()

      }
   }
  
   public void copyObject() throws Exception {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(201)
            .addHeader(SwiftHeaders.OBJECT_COPY_FROM, "/bar/foo.txt")));
      try {
         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
         assertTrue(api.objectApiInRegionForContainer("DFW", "foo")
View Full Code Here

Examples of com.squareup.okhttp.mockwebserver.MockWebServer.enqueue()

   }
  
   public void copyObject() throws Exception {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(201)
            .addHeader(SwiftHeaders.OBJECT_COPY_FROM, "/bar/foo.txt")));
      try {
         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
         assertTrue(api.objectApiInRegionForContainer("DFW", "foo")
            .copy("bar.txt", "bar", "foo.txt"));
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.