Package com.tibco.patterns.deduplication
Class NetricsRecQuerySource
- java.lang.Object
-
- com.tibco.patterns.deduplication.NetricsRecQuerySource
-
- All Implemented Interfaces:
KeyedQuerySource
- Direct Known Subclasses:
CursorQuerySource
public class NetricsRecQuerySource extends java.lang.Object implements KeyedQuerySource
Binds aQueryBuilderto aNetricsBaseRecSrc.
-
-
Constructor Summary
Constructors Constructor Description NetricsRecQuerySource(com.netrics.likeit.NetricsBaseRecSrc recSource, QueryBuilder<KeyedNetricsRecord> queryBuilder)Create a NetricsRecQuerySource instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetPosition()Get the position in the record source.intgetQueriesProduced()Retrieve the number of queries produced.intgetQueryLimit()Retrieve the query limit.booleanisEOS()Check if the scan is complete.KeyedQuerynext()Gets the next query from the source.voidsetQueryLimit(int limit)Set a limit on the number of queries produced.
-
-
-
Constructor Detail
-
NetricsRecQuerySource
public NetricsRecQuerySource(com.netrics.likeit.NetricsBaseRecSrc recSource, QueryBuilder<KeyedNetricsRecord> queryBuilder)Create a NetricsRecQuerySource instance.- Parameters:
recSource- A source of records to build queries from.queryBuilder- Defines how to build a KeyedQuery from a source record. (The row is represented as a NetricsBaseRecord.)
-
-
Method Detail
-
getPosition
public java.lang.String getPosition()
Get the position in the record source.- Specified by:
getPositionin interfaceKeyedQuerySource- Returns:
- an opaque string indicating the scan position. This string can be stored and later passed into setPosition on another KeyedQuerySource instance of the same type.
-
isEOS
public boolean isEOS() throws com.netrics.likeit.NetricsRecSrcExceptionDescription copied from interface:KeyedQuerySourceCheck if the scan is complete.- Specified by:
isEOSin interfaceKeyedQuerySource- Returns:
- true if there are no more queries available.
- Throws:
com.netrics.likeit.NetricsRecSrcException
-
next
public KeyedQuery next() throws com.netrics.likeit.NetricsRecSrcException, QueryBuildException
Description copied from interface:KeyedQuerySourceGets the next query from the source.- Specified by:
nextin interfaceKeyedQuerySource- Returns:
- The query. Returns null if no query is desired for the particular source entry. (This allows for consistent batch sizing.)
- Throws:
com.netrics.likeit.NetricsRecSrcExceptionQueryBuildException
-
setQueryLimit
public void setQueryLimit(int limit)
Set a limit on the number of queries produced.- Parameters:
limit- The limit. Set to 0 for no limit.
-
getQueryLimit
public int getQueryLimit()
Retrieve the query limit.- Returns:
- The query limit, or 0 if there is no limit.
-
getQueriesProduced
public int getQueriesProduced()
Retrieve the number of queries produced.- Returns:
- The number of queries produced.
-
-