Package com.leansoft.bigqueue

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


        }
      }
      if (queueWithLowestItem == null) break; // all queues are empty
      // extract and put the lowest item into the target queue
      byte[] data = queueWithLowestItem.dequeue();
      targetBigQueue.enqueue(data);
    }
   
    // release the source queues since we have done with them
    for(IBigQueue bigQueue : listOfSortedQueues) {
      bigQueue.removeAll(); // make empty the queue, delete back data files to save disk space
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.