The returned iterator shall be closed once it is no longer needed, to account for streaming implementations of this interface to release any needed resource such as database or remote service connections. Example usage:
Catalog catalog = ... Filter filter = ... CloseableIterator iterator = catalog.list(LayerInfo.class, filter); try{ while(iterator.hasNext()){ iterator.next(); } }finally{ iterator.close(); }
@param of the type of catalog objects to return. Super interfaces of concrete catalog objectsare allowed (such as {@code StoreInfo.class} and {@code ResourceInfo.class}, although the more generic {@code Info.class} and {@code CatalogInfo.class} are not.
@param filter the query predicate, use {@link Filter#INCLUDE} if needed, {@code null} is notaccepted.
@return an iterator over the predicate matching catalog objects that must be closed onceconsumed
@throws IllegalArgumentException if {@code sortOrder != null} and {@link #canSort !canSort(of, sortOrder)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|