|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.lmax.disruptor.EventPublisher<E>
public class EventPublisher<E>
Utility class for simplifying publication to the ring buffer.
| Constructor Summary | |
|---|---|
EventPublisher(RingBuffer<E> ringBuffer)
Construct from the ring buffer to be published to. |
|
| Method Summary | |
|---|---|
void |
publishEvent(EventTranslator<E> translator)
Publishes an event to the ring buffer. |
boolean |
tryPublishEvent(EventTranslator<E> translator,
int capacity)
Attempts to publish an event to the ring buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventPublisher(RingBuffer<E> ringBuffer)
ringBuffer - into which events will be published.| Method Detail |
|---|
public void publishEvent(EventTranslator<E> translator)
translator - The user specified translation for the event
public boolean tryPublishEvent(EventTranslator<E> translator,
int capacity)
translator - The user specified translation for the eventcapacity - The capacity that should be available before publishing
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||