backtype.storm.utils
Class DisruptorQueue

java.lang.Object
  extended by backtype.storm.utils.DisruptorQueue

public class DisruptorQueue
extends java.lang.Object

A single consumer queue that uses the LMAX Disruptor. They key to the performance is the ability to catch up to the producer by processing tuples in batches.


Nested Class Summary
static class DisruptorQueue.ObjectEventFactory
           
 
Constructor Summary
DisruptorQueue(ClaimStrategy claim, WaitStrategy wait)
           
 
Method Summary
 void consumeBatch( handler)
           
 void consumeBatchWhenAvailable( handler)
           
 void consumerStarted()
           
 void haltWithInterrupt()
           
 void publish(java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisruptorQueue

public DisruptorQueue(ClaimStrategy claim,
                      WaitStrategy wait)
Method Detail

consumeBatch

public void consumeBatch( handler)

haltWithInterrupt

public void haltWithInterrupt()

consumeBatchWhenAvailable

public void consumeBatchWhenAvailable( handler)

publish

public void publish(java.lang.Object obj)

consumerStarted

public void consumerStarted()