SQLFire 1.0.1

com.vmware.sqlfire.procedure
Interface IncomingResultSet


public interface IncomingResultSet

An interface for retrieving rows as List from an incoming result set. Uses blocking, balking, and timeout semantics in the style of a BlockingQueue.

See Also:
BlockingQueue

Field Summary
static List<Object> END_OF_RESULTS
          A zero-length row when returned indicates that there are no more results in this result set.
 
Method Summary
 ResultSetMetaData getMetaData()
          Return metadata information about the columns in this result set.
 List<Object> peekRow()
          Retrieves, but does not remove, the head row of this result set, returns null if there is no row currently available in this result set, or returns END_OF_RESULTS if there are no more rows in this result set.
 List<Object> peekRow(long timeout, TimeUnit unit)
          Retrieves, but does not remove, the head row of this result set, waiting up to the specified wait time if necessary for a row to become available, or returns END_OF_RESULTS if there are no more rows in this result set.
 List<Object> pollRow()
          Retrieves and removes the head row of this result set, returns null if there is no row currently available in this result set, or returns END_OF_RESULTS if there are no more rows in this result set.
 List<Object> pollRow(long timeout, TimeUnit unit)
          Retrieves and removes the head row of this result set, waiting up to the specified wait time if necessary for a row to become available, or returns END_OF_RESULTS if there are no more rows in this result set.
 List<Object> takeRow()
          Retrieve and removes the head row in this result set as a List, waiting if necessary until an element becomes available, or returning END_OF_RESULTS if there are no more rows in this result set.
 List<Object> waitPeekRow()
          Retrieves, but does not remove, the head row of this result set, waiting if necessary until an element becomes available, or returning END_OF_RESULTS if there are no more rows in this result set.
 

Field Detail

END_OF_RESULTS

static final List<Object> END_OF_RESULTS
A zero-length row when returned indicates that there are no more results in this result set.

Method Detail

takeRow

List<Object> takeRow()
                     throws InterruptedException
Retrieve and removes the head row in this result set as a List, waiting if necessary until an element becomes available, or returning END_OF_RESULTS if there are no more rows in this result set.

Returns:
the head row of this result set, or returns END_OF_RESULTS if there are no more rows in this result set.
Throws:
InterruptedException - if interrupted while waiting

pollRow

List<Object> pollRow()
Retrieves and removes the head row of this result set, returns null if there is no row currently available in this result set, or returns END_OF_RESULTS if there are no more rows in this result set.

Returns:
the head row of this result set if it is available, null if there is no row in this result set currently available, or END_OF_RESULTS if there are no more rows in this result set.

pollRow

List<Object> pollRow(long timeout,
                     TimeUnit unit)
                     throws InterruptedException
Retrieves and removes the head row of this result set, waiting up to the specified wait time if necessary for a row to become available, or returns END_OF_RESULTS if there are no more rows in this result set.

Parameters:
timeout - how long to wait before giving up, in units of unit
unit - a TimeUnit determining how to interpret the timeout parameter
Returns:
the head row of this queue, null if the specified waiting time elapses before an element is available, or END_OF_RESULTS if there are no more rows in this result set.
Throws:
InterruptedException - if interrupted while waiting

peekRow

List<Object> peekRow(long timeout,
                     TimeUnit unit)
                     throws InterruptedException
Retrieves, but does not remove, the head row of this result set, waiting up to the specified wait time if necessary for a row to become available, or returns END_OF_RESULTS if there are no more rows in this result set.

Parameters:
timeout - how long to wait before giving up, in units of unit
unit - a TimeUnit determining how to interpret the timeout parameter
Returns:
the head row of this queue, null if the specified waiting time elapses before an element is available, or END_OF_RESULTS if there are no more rows in this result set.
Throws:
InterruptedException - if interrupted while waiting

peekRow

List<Object> peekRow()
Retrieves, but does not remove, the head row of this result set, returns null if there is no row currently available in this result set, or returns END_OF_RESULTS if there are no more rows in this result set.

Returns:
the head row of this result set if it is available, null if there is no row in this result set currently available, or END_OF_RESULTS if there are no more rows in this result set.

waitPeekRow

List<Object> waitPeekRow()
                         throws InterruptedException
Retrieves, but does not remove, the head row of this result set, waiting if necessary until an element becomes available, or returning END_OF_RESULTS if there are no more rows in this result set.

Returns:
the head row of this result set, or returns END_OF_RESULTS if there are no more rows in this result set.
Throws:
InterruptedException - if interrupted while waiting

getMetaData

ResultSetMetaData getMetaData()
                              throws InterruptedException
Return metadata information about the columns in this result set. May block until the metadata is available.

Throws:
InterruptedException - if interrupted while waiting

SQLFire 1.0.1

Copyright © 2010-2011 VMware, Inc. All rights reserved.