Class QueryStreamManager

java.lang.Object
com.sparsity.sparksee.gdb.QueryStreamManager

public class QueryStreamManager extends Object
QueryStreamManager interface.

A QueryStreamManager is the interface to handle objects that will implement user defined query operations through the STREAM operator.

When a query using a custom named STREAM operator requires it it will allocate a QueryStream object using the provided QueryStreamManagers. And once it's finished it will be released through the same QueryStreamManager that was used to allocate it.

Application exceptions must be cached by the subclass that implements the interface.

Maintaining and freeing the QueryStreamManager itself is responsibility of the caller.

Author:
Sparsity Technologies http://www.sparsity-technologies.com
  • Method Details

    • releaseQueryStream

      public void releaseQueryStream(QueryStream qstream)
      Release a QueryStream.

      The QueryStream must have been reserved by the same QueryStreamManager

      The Manager must free the QueryStream if it was allocated or handle it as it requires for it's implementation.

      Parameters:
      qstream - [In] The QueryStream to be released.
    • getQueryStream

      public QueryStream getQueryStream(String name, Session session)
      Returns an instance of a QueryStream with the given name or NULL.

      If this manager handles the given name it will return an instance of a QueryStream that will provide the requested QueryStream operation.

      The ReleaseQueryStream will be called once it's usage is finished. It's up to the QueryStreamManager implementation to really allocate/deallocate a new QueryStream each time or share a static one.

      Parameters:
      name - [In] The name of the QueryStream that we want to get
      session - [In] A pointer to the Session used in the Query and may be required by the Stream.
      Returns:
      Returns a QueryStream or NULL