org.apache.excalibur.event.impl
Class LossyMultiCastSink
java.lang.Object
org.apache.excalibur.event.impl.LossyMultiCastSink
- All Implemented Interfaces:
- Sink
public class LossyMultiCastSink
- extends Object
- implements Sink
This is a seda.event.Sink
implementation that multicasts enqueue operations to the
contained and concrete sink objects. Compared to the
regular 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.
- Version:
- $Revision: 1.4 $
- Author:
- Avalon Development Team
Fields inherited from interface org.apache.excalibur.event.Sink |
ROLE |
Constructor Summary |
LossyMultiCastSink(Collection sinks)
This constructor creates a failure tolerant sink
based on the collection of sink arrays. |
LossyMultiCastSink(Collection sinks,
boolean oneSuccess)
This constructor creates a failure tolerant sink
based on the collection of sink arrays. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LossyMultiCastSink
public LossyMultiCastSink(Collection sinks)
- This constructor creates a failure tolerant sink
based on the collection of sink arrays. None of
the enqueue operations must succeed.
- Parameters:
sinks
- A collection of sink arrays for each stage.- Since:
- May 16, 2002
LossyMultiCastSink
public LossyMultiCastSink(Collection sinks,
boolean oneSuccess)
- This constructor creates a failure tolerant sink
based on the collection of sink arrays. The additional
boolean flag describes whether at least one or none
of the enqueue operations must succeed.
- Parameters:
sinks
- A collection of sink arrays for each stage.- Since:
- May 16, 2002
canAccept
public int canAccept()
- Specified by:
canAccept
in interface Sink
- See Also:
Sink.canAccept()
isFull
public boolean isFull()
- Specified by:
isFull
in interface Sink
- See Also:
Sink.isFull()
maxSize
public int maxSize()
- Specified by:
maxSize
in interface Sink
- See Also:
Sink.maxSize()
enqueue
public void enqueue(Object element)
throws SinkException
- Specified by:
enqueue
in interface Sink
- Throws:
SinkException
- See Also:
Sink.enqueue(Object)
enqueue
public void enqueue(Object[] elements)
throws SinkException
- Specified by:
enqueue
in interface Sink
- Throws:
SinkException
- See Also:
Sink.enqueue(Object[])
tryEnqueue
public boolean tryEnqueue(Object element)
- Specified by:
tryEnqueue
in interface Sink
- See Also:
Sink.tryEnqueue(Object)
prepareEnqueue
public PreparedEnqueue prepareEnqueue(Object[] elements)
throws SinkException
- Specified by:
prepareEnqueue
in interface Sink
- Throws:
SinkException
- See Also:
Sink.prepareEnqueue(Object[])
size
public int size()
- Specified by:
size
in interface Sink
- See Also:
Sink.size()
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.