|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.service.proxy.ClientBuffer<E>
public class ClientBuffer<E>
Serializable class wraps a RemoteBuffer delegating methods
through to the IBuffer on the remote service while masquerading
IOExceptions so that we can implement the IBuffer API.
| Constructor Summary | |
|---|---|
ClientBuffer(RemoteBuffer<E> buffer)
|
|
| 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 IBuffer.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 IBuffer.flush(). |
int |
size()
The #of elements currently in the buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClientBuffer(RemoteBuffer<E> buffer)
buffer - A proxy for the RemoteBuffer.| Method Detail |
|---|
public void add(E e)
IBuffer
add in interface IBuffer<E>e - The elementpublic long flush()
IBufferIRelation since the counter was last IBuffer.reset() (the
mutationCount).
Note: If the buffer does not write on an IRelation then it SHOULD
return ZERO(0).
flush in interface IBuffer<E>IRelation.
See IMutableRelationpublic boolean isEmpty()
IBuffer
isEmpty in interface IBuffer<E>public void reset()
IBufferIBuffer.flush(). Any data in the buffer will be discarded.
reset in interface IBuffer<E>public int size()
IBuffer
size in interface IBuffer<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||