Interface ListSource<T>

  • Type Parameters:
    T - The type of the resulting object read from CDF.
    All Known Implementing Classes:
    Assets, Events

    public interface ListSource<T>
    An interface for API endpoints that supports iterating over a results stream based on a Request specification.
    • Method Detail

      • list

        Iterator<List<T>> list​(Request requestParameters)
                        throws Exception
        Returns all T objects that matches the filters set in the Request. The results are paged through / iterated over via an 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.
        Parameters:
        requestParameters - the filters to use for retrieving the results objects
        Returns:
        an Iterator to page through the results set.
        Throws:
        Exception