Package com.streambase.sb.client
Class StreamBaseClient.TupleBuffer
- java.lang.Object
-
- com.streambase.sb.client.StreamBaseClient.TupleBuffer
-
- Direct Known Subclasses:
StreamBaseClient.SerializedTupleBuffer
- Enclosing class:
- StreamBaseClient
public abstract class StreamBaseClient.TupleBuffer extends Object
Class for abstracting away where tuples come from, Buffers, Collections, and Single Enqueues.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
addToBuffer(Tuple tuple, int id)
Add to bufferboolean
canDequeue(StreamProperties props)
Can dequeue?boolean
canEnqueue(StreamProperties props)
Can enqueue?protected void
checkTuple(Tuple tuple)
Check tuple to make sure it is up to snuffboolean
equals(Object obj)
int
hashCode()
StreamProperties
props()
get stream properties for this Bufferint
tupleCount()
Get tuple count
-
-
-
Method Detail
-
addToBuffer
protected abstract void addToBuffer(Tuple tuple, int id) throws TupleException
Add to buffer- Parameters:
tuple
- Tuple to addid
- Identifier- Throws:
TupleException
- Error adding to buffer
-
props
public StreamProperties props()
get stream properties for this Buffer- Returns:
- stream properties for the buffer
-
checkTuple
protected void checkTuple(Tuple tuple)
Check tuple to make sure it is up to snuff- Parameters:
tuple
-
-
tupleCount
public int tupleCount()
Get tuple count- Returns:
- Number of tuples
-
canEnqueue
public boolean canEnqueue(StreamProperties props)
Can enqueue?- Parameters:
props
- Properties- Returns:
- true if can enqueue, false otherwise
-
canDequeue
public boolean canDequeue(StreamProperties props)
Can dequeue?- Parameters:
props
- Properties- Returns:
- true if can dequeue, false otherwise
-
-