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
IOException
s 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()
IBuffer
IRelation
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 IMutableRelation
public boolean isEmpty()
IBuffer
public void reset()
IBuffer
IBuffer.flush()
. Any data in the buffer will be discarded.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.