|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.excalibur.event.impl.LossyMultiCastSink
public class LossyMultiCastSink
This is a org.apache.excalibur.event.seda.event.Sink
implementation that multicasts enqueue operations to the
contained and concrete sink objects. Compared to the
regular org.apache.excalibur.event.seda.event.impl.MultiCastSink
this sink works in that it delivers zero, one or more sinks.
It can be configured to fail when less than one sink was
delivered to.
| Nested Class Summary | |
|---|---|
private static class |
LossyMultiCastSink.DefaultPreparedEnqueue
A prepared enqueue object that holds other prepared enqueue objects and allows to perform a commit / abort on all of these objects. |
| Field Summary | |
|---|---|
private boolean |
m_oneSuccess
indicates if at least one enqueue operation must succeed. |
private java.util.Collection |
m_sinks
A collection of sink arrays representing the sinks to enqueue the element to. |
private int |
m_size
The size of the sink. |
| Fields inherited from interface org.apache.excalibur.event.Sink |
|---|
ROLE |
| Constructor Summary | |
|---|---|
LossyMultiCastSink(java.util.Collection sinks)
This constructor creates a failure tolerant sink based on the collection of sink arrays. |
|
LossyMultiCastSink(java.util.Collection sinks,
boolean oneSuccess)
This constructor creates a failure tolerant sink based on the collection of sink arrays. |
|
| Method Summary | |
|---|---|
int |
canAccept()
|
void |
enqueue(java.lang.Object element)
|
void |
enqueue(java.lang.Object[] elements)
|
boolean |
isFull()
|
int |
maxSize()
|
org.apache.excalibur.event.PreparedEnqueue |
prepareEnqueue(java.lang.Object[] elements)
|
int |
size()
|
boolean |
tryEnqueue(java.lang.Object element)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final java.util.Collection m_sinks
private final int m_size
private final boolean m_oneSuccess
| Constructor Detail |
|---|
public LossyMultiCastSink(java.util.Collection sinks)
sinks - A collection of sink arrays for each stage.
public LossyMultiCastSink(java.util.Collection sinks,
boolean oneSuccess)
sinks - A collection of sink arrays for each stage.| Method Detail |
|---|
public int canAccept()
canAccept in interface org.apache.excalibur.event.SinkSink.canAccept()public boolean isFull()
isFull in interface org.apache.excalibur.event.SinkSink.isFull()public int maxSize()
maxSize in interface org.apache.excalibur.event.SinkSink.maxSize()
public void enqueue(java.lang.Object element)
throws org.apache.excalibur.event.SinkException
enqueue in interface org.apache.excalibur.event.Sinkorg.apache.excalibur.event.SinkExceptionSink.enqueue(Object)
public void enqueue(java.lang.Object[] elements)
throws org.apache.excalibur.event.SinkException
enqueue in interface org.apache.excalibur.event.Sinkorg.apache.excalibur.event.SinkExceptionSink.enqueue(Object[])public boolean tryEnqueue(java.lang.Object element)
tryEnqueue in interface org.apache.excalibur.event.SinkSink.tryEnqueue(Object)
public org.apache.excalibur.event.PreparedEnqueue prepareEnqueue(java.lang.Object[] elements)
throws org.apache.excalibur.event.SinkException
prepareEnqueue in interface org.apache.excalibur.event.Sinkorg.apache.excalibur.event.SinkExceptionSink.prepareEnqueue(Object[])public int size()
size in interface org.apache.excalibur.event.SinkSink.size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||