@ProviderType public interface CloseableQuery extends com.day.cq.search.Query, Closeable
ResourceResolver that wraps a JCR
session after any iteration over search result Hits, which can produce much stack trace in error.log.
This extension closes the retained resolver via the Closeable.close() method for use in a try-with-resources
block.
Because ResourceResolver.close() calls Session.logout() on the underlying session, it is important that
the logout method be guarded by a session wrapper. (This is done automatically by the CloseableQueryBuilder
service.)| Modifier and Type | Method and Description |
|---|---|
default void |
close() |
default void close()
close in interface AutoCloseableclose in interface CloseableCopyright © 2013–2020 Adobe. All rights reserved.