|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object seda.sandStorm.core.SimpleSink
public abstract class SimpleSink
The SimpleSink class is an abstract class which implements 'null' functionality for most of the administrative methods of SinkIF. This class can be extended to implement simple SinkIF's which don't require most of the special behavior of the fully general case.
SinkIF
Constructor Summary | |
---|---|
SimpleSink()
|
Method Summary | |
---|---|
void |
enqueue_abort(java.lang.Object key)
Not supported; throws an IllegalArgumentException. |
void |
enqueue_commit(java.lang.Object key)
Not supported; throws an IllegalArgumentException. |
boolean |
enqueue_lossy(QueueElementIF enqueueMe)
Calls enqueue() and returns false if SinkException occurs. |
void |
enqueue_many(QueueElementIF[] enqueueMe)
Simply calls enqueue() on each item in the array. |
java.lang.Object |
enqueue_prepare(QueueElementIF[] enqueueMe)
Not supported; throws an IllegalArgumentException. |
abstract void |
enqueue(QueueElementIF enqueueMe)
Must be implemented by subclasses. |
EnqueuePredicateIF |
getEnqueuePredicate()
Returns null. |
int |
profileSize()
Returns size. |
void |
setEnqueuePredicate(EnqueuePredicateIF pred)
Not supported; throws an IllegalArgumentException. |
int |
size()
Returns 0. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleSink()
Method Detail |
---|
public abstract void enqueue(QueueElementIF enqueueMe) throws SinkException
enqueue
in interface SinkIF
enqueueMe
- The QueueElementIF
to enqueue
SinkFullException
- Indicates that the sink is temporarily full.
SinkClosedException
- Indicates that the sink is
no longer being serviced.
SinkException
public boolean enqueue_lossy(QueueElementIF enqueueMe)
enqueue_lossy
in interface SinkIF
enqueueMe
- The QueueElementIF
to enqueue
public void enqueue_many(QueueElementIF[] enqueueMe) throws SinkException
enqueue_many
in interface SinkIF
enqueueMe
- The element array to enqueue
SinkFullException
- Indicates that the sink is temporarily full.
SinkClosedException
- Indicates that the sink is
no longer being serviced.
SinkException
public java.lang.Object enqueue_prepare(QueueElementIF[] enqueueMe) throws SinkException
enqueue_prepare
in interface SinkIF
enqueueMe
- The element array to provisionally enqueue
SinkFullException
- Indicates that the sink is temporarily full
and that the requested elements could not be provisionally enqueued.
SinkClosedException
- Indicates that the sink is
no longer being serviced.
SinkException
enqueue_commit
,
enqueue_abort
public void enqueue_commit(java.lang.Object key)
enqueue_commit
in interface SinkIF
public void enqueue_abort(java.lang.Object key)
enqueue_abort
in interface SinkIF
public void setEnqueuePredicate(EnqueuePredicateIF pred)
setEnqueuePredicate
in interface SinkIF
public EnqueuePredicateIF getEnqueuePredicate()
getEnqueuePredicate
in interface SinkIF
public int size()
size
in interface SinkIF
public int profileSize()
profileSize
in interface ProfilableIF
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |