Class QueryStreamManager
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 Summary
Modifier and TypeMethodDescriptiongetQueryStream(String name, Session session) Returns an instance of a QueryStream with the given name or NULL.voidreleaseQueryStream(QueryStream qstream) Release a QueryStream.
-
Method Details
-
releaseQueryStream
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
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 getsession- [In] A pointer to the Session used in the Query and may be required by the Stream.- Returns:
- Returns a QueryStream or NULL
-