public class ClientBuffer<E> extends Object implements IBuffer<E>, Serializable
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 and Description |
|---|
ClientBuffer(RemoteBuffer<E> buffer) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public ClientBuffer(RemoteBuffer<E> buffer)
buffer - A proxy for the RemoteBuffer.public 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()
IBufferpublic void reset()
IBufferIBuffer.flush(). Any data in the buffer will be discarded.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.