All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cognite.client.stream.ListSource Maven / Gradle / Ivy

There is a newer version: 2.3.3
Show newest version
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