Package com.streambase.sb.client
Class DequeueResult
java.lang.Object
com.streambase.sb.client.DequeueResult
- Direct Known Subclasses:
SimpleDequeueResult
Encapsulates the data returned from a dequeue() operation.
Contains references to the originating stream, and a list of tuples.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
A callback interface that can be implemented by an object that is associated with a StreamBaseClient and which gets used in the course of dequeuing tuples. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Status code indicating that the connection was closedstatic final int
Status code indicating a normal dequeueprotected final StreamProperties
Stream propertiesprotected final Throwable
Throwable exceptionstatic final int
Status code indicating a timeout during dequeue -
Method Summary
Modifier and TypeMethodDescriptionint
Check and return the status of this DequeueResult.Returns the schema for the tuples dequeued, may return nullreturn the server that produced this DequeueResult.int
Return the status of this DequeueResult.Returns the name of the stream on which tuples were dequeued.Return the StreamProperties for this DequeueResult.abstract int
Returns the number of tuples dequeued.iterator()
Returns an iterator of all tuples.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
GOOD
public static final int GOODStatus code indicating a normal dequeue- See Also:
-
TIMEOUT
public static final int TIMEOUTStatus code indicating a timeout during dequeue- See Also:
-
CLOSED
public static final int CLOSEDStatus code indicating that the connection was closed- See Also:
-
props
Stream properties -
throwable
Throwable exception
-
-
Method Details
-
getStreamName
Returns the name of the stream on which tuples were dequeued. May return null.- Returns:
- the unqualified name of the stream, may return null
-
getSchema
Returns the schema for the tuples dequeued, may return null- Returns:
- the schema for the tuples dequeued, may return null
- Since:
- 5.0
-
getStreamProperties
Return the StreamProperties for this DequeueResult. May return null- Returns:
- StreamProperties, may return null
-
getServerURI
return the server that produced this DequeueResult. May return null.- Returns:
- the server that produced this DequeueResult. May return null.
- Since:
- 5.1
-
getTupleCount
public abstract int getTupleCount()Returns the number of tuples dequeued.- Returns:
- number of tuples
-
iterator
Returns an iterator of all tuples. -
getStatus
public int getStatus()Return the status of this DequeueResult.- Returns:
- a status code as described
- See Also:
-
checkStatus
Check and return the status of this DequeueResult. Similar togetStatus()
but will throw any exceptions that this DequeueResult has collected.- Returns:
- a status code like
getStatus()
- Throws:
StreamBaseException
- if this DequeueResult has collected any exceptions- Since:
- 7.0
- See Also:
-
toString
-