Package com.leansoft.bigqueue

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


        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

      assertNull(bigQueue.peek());
     
      // enqueue some items
      for(int i = 0; i < 10; i++) {
        String item = String.valueOf(i);
        bigQueue.enqueue(item.getBytes());
      }
      // now the big queue is not empty
      assertTrue(!bigQueue.isEmpty());
      assertTrue(bigQueue.size() == 10);
     
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.