Package com.surftools.BeanstalkClient

Examples of com.surftools.BeanstalkClient.Client.peek()


    Client client = new ClientImpl(TEST_HOST, TEST_PORT);

    Object[] tubeNames = pushWatchedTubes(client);
    client.useTube((String) tubeNames[1]);

    Job job = client.peek(-1);
    assertNull(job);
    job = client.peek(0);
    assertNull(job);

    String srcString = "testPeek-";
View Full Code Here


    Object[] tubeNames = pushWatchedTubes(client);
    client.useTube((String) tubeNames[1]);

    Job job = client.peek(-1);
    assertNull(job);
    job = client.peek(0);
    assertNull(job);

    String srcString = "testPeek-";

    int nJobs = 3;
View Full Code Here

      jobIds[i] = jobId;
    }

    // peek 'em once
    for (int i = 0; i < nJobs; ++i) {
      job = client.peek(jobIds[i]);
      assertNotNull(job);
      assertEquals(jobIds[i], job.getJobId());
    }

    // peek 'em again
View Full Code Here

      assertEquals(jobIds[i], job.getJobId());
    }

    // peek 'em again
    for (int i = 0; i < nJobs; ++i) {
      job = client.peek(jobIds[i]);
      assertNotNull(job);
      assertEquals(jobIds[i], job.getJobId());
    }

    // reserve and delete
View Full Code Here

      client.delete(job.getJobId());
    }

    // peek one last time
    for (int i = 0; i < nJobs; ++i) {
      job = client.peek(jobIds[i]);
      assertNull(job);
    }

    popWatchedTubes(client, tubeNames);
  }
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.