com.cognite.client.stream.ListSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cdf-sdk-java Show documentation
Show all versions of cdf-sdk-java Show documentation
Java SDK for reading and writing from/to CDF resources.
package com.cognite.client.stream;
import com.cognite.client.Request;
import java.util.Iterator;
import java.util.List;
/**
* An interface for API endpoints that supports iterating over a results stream based on a
* {@link Request} specification.
*
* @param The type of the resulting object read from CDF.
*/
public interface ListSource {
/**
* Returns all {@code T} objects that matches the filters set in the {@link Request}.
*
* The results are paged through / iterated over via an {@link Iterator}--the entire results set is not buffered in
* memory, but streamed in "pages" from the Cognite api. If you need to buffer the entire results set, then you
* have to stream these results into your own data structure.
*
* @param requestParameters the filters to use for retrieving the results objects
* @return an {@link Iterator} to page through the results set.
*/
public Iterator> list(Request requestParameters) throws Exception;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy