Package com.cognite.client.servicesV1
Class ConnectorServiceV1.SingleRequestItemReader<T>
- java.lang.Object
-
- com.cognite.client.servicesV1.ConnectorServiceV1.SingleRequestItemReader<T>
-
- All Implemented Interfaces:
ItemReader<T>,Serializable
- Enclosing class:
- ConnectorServiceV1
public abstract static class ConnectorServiceV1.SingleRequestItemReader<T> extends Object implements ItemReader<T>
Reads items from the Cognite API. This reader targets API endpoints which complete its operation in a single request.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SingleRequestItemReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseItems<T>getItems(Request items)Executes a request to get items and blocks the thread until all items have been downloaded.CompletableFuture<ResponseItems<T>>getItemsAsync(Request items)Executes an item-based request to get items asynchronously.
-
-
-
Method Detail
-
getItems
public ResponseItems<T> getItems(Request items) throws Exception
Executes a request to get items and blocks the thread until all items have been downloaded.- Specified by:
getItemsin interfaceItemReader<T>- Parameters:
items-- Returns:
- Throws:
Exception
-
getItemsAsync
public CompletableFuture<ResponseItems<T>> getItemsAsync(Request items) throws Exception
Executes an item-based request to get items asynchronously.- Specified by:
getItemsAsyncin interfaceItemReader<T>- Parameters:
items-- Returns:
- Throws:
Exception
-
-