|
More information: http://www.cs.berkeley.edu/~mdw/proj/seda/ | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mdw.sandStorm.core.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 |
|
Constructor Detail |
public SimpleSink()
Method Detail |
public abstract void enqueue(QueueElementIF enqueueMe) throws SinkException
enqueue
in interface SinkIF
mdw.sandStorm.api.SinkIF
element
- The QueueElementIF
to enqueueSinkFullException
- Indicates that the sink is temporarily full.SinkClosedException
- Indicates that the sink is
no longer being serviced.public boolean enqueue_lossy(QueueElementIF enqueueMe)
enqueue_lossy
in interface SinkIF
mdw.sandStorm.api.SinkIF
element
- The QueueElementIF
to enqueuepublic void enqueue_many(QueueElementIF[] enqueueMe) throws SinkException
enqueue_many
in interface SinkIF
mdw.sandStorm.api.SinkIF
elements
- The element array to enqueueSinkFullException
- Indicates that the sink is temporarily full.SinkClosedException
- Indicates that the sink is
no longer being serviced.public java.lang.Object enqueue_prepare(QueueElementIF[] enqueueMe) throws SinkException
enqueue_prepare
in interface SinkIF
mdw.sandStorm.api.SinkIF
elements
- The element array to provisionally enqueueSinkFullException
- 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.enqueue_commit
,
enqueue_abort
public void enqueue_commit(java.lang.Object key)
enqueue_commit
in interface SinkIF
mdw.sandStorm.api.SinkIF
key
- The enqueue key returned by a previous call to
enqueue_prepare().java.lang.IllegalArgumentException
- Thrown if an unknown enqueue key
is provided.public void enqueue_abort(java.lang.Object key)
enqueue_abort
in interface SinkIF
mdw.sandStorm.api.SinkIF
key
- The enqueue key returned by a previous call to
enqueue_prepare().java.lang.IllegalArgumentException
- Thrown if an unknown enqueue key
is provided.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
|
More information: http://www.cs.berkeley.edu/~mdw/proj/seda/ | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |