Package org.apache.ignite.cache.query
Class BulkLoadContextCursor
- java.lang.Object
- 
- org.apache.ignite.cache.query.BulkLoadContextCursor
 
- 
- All Implemented Interfaces:
- AutoCloseable,- Iterable<List<?>>,- FieldsQueryCursor<List<?>>,- QueryCursor<List<?>>
 
 public class BulkLoadContextCursor extends Object implements FieldsQueryCursor<List<?>> A special FieldsQueryCursor subclass that is used as a sentinel to transfer data from bulk load (COPY) command to the JDBC or other client-facing driver: the bulk load batch processor and parameters to send to the client.
- 
- 
Constructor SummaryConstructors Constructor Description BulkLoadContextCursor(org.apache.ignite.internal.processors.bulkload.BulkLoadProcessor processor, org.apache.ignite.internal.processors.bulkload.BulkLoadAckClientParameters clientParams)Creates a cursor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.ignite.internal.processors.bulkload.BulkLoadProcessorbulkLoadProcessor()Returns a bulk load context.org.apache.ignite.internal.processors.bulkload.BulkLoadAckClientParametersclientParams()Returns the bulk load parameters to send to the client.voidclose()Closes all resources related to this cursor.List<List<?>>getAll()Gets all query results and stores them in the collection.intgetColumnsCount()Gets number of columns in a row.StringgetFieldName(int idx)Gets field name.@NotNull Iterator<List<?>>iterator()- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.lang.IterableforEach, spliterator
 
- 
 
- 
- 
- 
Constructor Detail- 
BulkLoadContextCursorpublic BulkLoadContextCursor(org.apache.ignite.internal.processors.bulkload.BulkLoadProcessor processor, org.apache.ignite.internal.processors.bulkload.BulkLoadAckClientParameters clientParams)Creates a cursor.- Parameters:
- processor- Bulk load context object to store.
- clientParams- Parameters to send to client.
 
 
- 
 - 
Method Detail- 
bulkLoadProcessorpublic org.apache.ignite.internal.processors.bulkload.BulkLoadProcessor bulkLoadProcessor() Returns a bulk load context.- Returns:
- a bulk load context.
 
 - 
clientParamspublic org.apache.ignite.internal.processors.bulkload.BulkLoadAckClientParameters clientParams() Returns the bulk load parameters to send to the client.- Returns:
- The bulk load parameters to send to the client.
 
 - 
getAllpublic List<List<?>> getAll() Gets all query results and stores them in the collection. Use this method when you know in advance that query result is relatively small and will not cause memory utilization issues.Since all the results will be fetched, all the resources will be closed automatically after this call, e.g. there is no need to call QueryCursor.close()method in this case.- Specified by:
- getAllin interface- QueryCursor<List<?>>
- Returns:
- List containing all query results.
 
 - 
closepublic void close() Closes all resources related to this cursor. If the query execution is in progress (which is possible in case of invoking from another thread), a cancel will be attempted. Sequential calls to this method have no effect.Note: don't forget to close query cursors. Not doing so may lead to various resource leaks. - Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- QueryCursor<List<?>>
 
 - 
getFieldNamepublic String getFieldName(int idx) Gets field name.- Specified by:
- getFieldNamein interface- FieldsQueryCursor<List<?>>
- Parameters:
- idx- field index.
- Returns:
- Field name.
 
 - 
getColumnsCountpublic int getColumnsCount() Gets number of columns in a row.- Specified by:
- getColumnsCountin interface- FieldsQueryCursor<List<?>>
- Returns:
- row size.
 
 
- 
 
-