|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IBuffer<E>
A buffer abstraction.
An AbstractArrayBuffer is generally used to write on an
IRelation while BlockingBuffer may be used to feed an
iterator on which another process will read asynchronously. An
UnsynchronizedArrayBuffer may be used in single-threaded contexts and
offers reduced synchronization overhead.
| Method Summary | |
|---|---|
void |
add(E e)
Add an element to the buffer. |
long |
flush()
Flush the buffer and return the #of elements written on the backing IRelation since the counter was last reset() (the
mutationCount). |
boolean |
isEmpty()
True iff there are no elements in the buffer. |
void |
reset()
Reset the state of the buffer, including the counter whose value is reported by flush(). |
int |
size()
The #of elements currently in the buffer. |
| Method Detail |
|---|
int size()
boolean isEmpty()
void add(E e)
e - The elementlong flush()
IRelation since the counter was last reset() (the
mutationCount).
Note: If the buffer does not write on an IRelation then it SHOULD
return ZERO(0).
IRelation.
See IMutableRelationvoid reset()
flush(). Any data in the buffer will be discarded.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||