Examples of enqueue()


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

   }
  
   @Test(expectedExceptions = CopyObjectException.class)
   public void copyObjectFail() throws InterruptedException, IOException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404)
            .addHeader(SwiftHeaders.OBJECT_COPY_FROM, "/bogus/foo.txt")));
     
      try {
         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
View Full Code Here

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

  
   @Test(expectedExceptions = CopyObjectException.class)
   public void copyObjectFail() throws InterruptedException, IOException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404)
            .addHeader(SwiftHeaders.OBJECT_COPY_FROM, "/bogus/foo.txt")));
     
      try {
         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
         // the following line will throw the CopyObjectException
View Full Code Here

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

         files.add(content, "/file" + i);
      }
      byte[] tarGz = ByteStreams.toByteArray(files.as(TarGzExporter.class).exportAsInputStream());

      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(201).setBody("{\"Number Files Created\": 10, \"Errors\": []}")));

      try {
         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
         ExtractArchiveResponse response = api.bulkApiInRegion("DFW").extractArchive("myContainer",
View Full Code Here

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

      }
      byte[] tarGz = ByteStreams.toByteArray(files.as(TarGzExporter.class).exportAsInputStream());

      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(201).setBody("{\"Number Files Created\": 10, \"Errors\": []}")));

      try {
         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
         ExtractArchiveResponse response = api.bulkApiInRegion("DFW").extractArchive("myContainer",
               newByteArrayPayload(tarGz), "tar.gz");
View Full Code Here

Examples of com.sun.org.apache.bcel.internal.util.ClassQueue.enqueue()

   */
  public JavaClass[] getAllInterfaces() {
    ClassQueue  queue = new ClassQueue();
    ClassVector vec   = new ClassVector();

    queue.enqueue(this);

    while(!queue.empty()) {
      JavaClass clazz = queue.dequeue();

      JavaClass   souper     = clazz.getSuperClass();
View Full Code Here

Examples of com.tulskiy.musique.playlist.PlaybackOrder.enqueue()

        table.getActionMap().put("enqueue", new AbstractAction("Add to Queue  ") {
            @Override
            public void actionPerformed(ActionEvent e) {
                for (Track track : table.getSelectedSongs()) {
                    PlaybackOrder order = player.getPlaybackOrder();
                    order.enqueue(track, playlist);
                }
                table.update();
                playlistTable.update();
            }
        });
View Full Code Here

Examples of eu.mosaic_cloud.interoperability.implementations.zeromq.ZeroMqChannelSocket.enqueue()

    client.connect (ZeroMqChannelTest.defaultServerEndpoint);
    for (int index = 0; index < ZeroMqChannelTest.defaultTries; index++) {
      final ByteBuffer header = ByteBuffer.wrap (UUID.randomUUID ().toString ().getBytes ());
      final ByteBuffer payload = ByteBuffer.wrap (UUID.randomUUID ().toString ().getBytes ());
      final ZeroMqChannelPacket packet1 = ZeroMqChannelPacket.create (serverIdentifier, header, payload);
      client.enqueue (packet1, ZeroMqChannelTest.defaultPollTimeout);
      final ZeroMqChannelPacket packet2 = server.dequeue (ZeroMqChannelTest.defaultPollTimeout);
      Assert.assertNotNull (packet2);
      server.enqueue (packet2, ZeroMqChannelTest.defaultPollTimeout);
      final ZeroMqChannelPacket packet3 = client.dequeue (ZeroMqChannelTest.defaultPollTimeout);
      Assert.assertNotNull (packet3);
View Full Code Here

Examples of flexjson.Path.enqueue()

        try {
            TypeContext typeContext = getContext().writeOpenObject();
            for (Object key : value.keySet()) {

                path.enqueue(key != null ? key.toString() : null);

                if (context.isIncluded(key != null ? key.toString() : null, value.get(key))) {

                    Transformer transformer = context.getTransformer(null, value.get(key));
View Full Code Here

Examples of it.unimi.dsi.fastutil.longs.LongArrayFIFOQueue.enqueue()

    private void compressDownward(long seedNode)
    {
        double threshold = Math.floor(size / compressionFactor);
        // P2 check same as above but shorter and slower (and invoked rarely)
        LongArrayFIFOQueue q = new LongArrayFIFOQueue();
        q.enqueue(seedNode);
        while (!q.isEmpty())
        {
            long node = q.dequeueLong();
            long atNode = get(node);
            long atSibling = get(sibling(node));
View Full Code Here

Examples of it.unimi.dsi.fastutil.longs.LongHeapPriorityQueue.enqueue()

   
    // The posting list iterator array (one per term) and initialization
    for (int i = 0; i < plm.size(); i++) {
      long docid = plm.getPosting(i).getId();
      assert(docid != IterablePosting.EOL);
      postingHeap.enqueue((docid << 32) + i);
    }
        boolean targetResultSetSizeReached = false;
        Queue<CandidateResult> candidateResultList = new PriorityQueue<CandidateResult>();
        int currentDocId = selectMinimumDocId(postingHeap);
        IterablePosting currentPosting = 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.