Package stroom.query.common.v2
Interface Store
-
- All Known Implementing Classes:
CriteriaStore
public interface Store
-
-
Method Summary
Modifier and Type Method Description void
awaitCompletion()
Wait indefinitely for search to complete unless interrupted.boolean
awaitCompletion(long timeout, java.util.concurrent.TimeUnit unit)
Wait for search to complete unless interrupted or the wait timeout is exceeded.void
destroy()
Stop searching and destroy any stored data.Data
getData(java.lang.String componentId)
Get the current data that is available for the specified component.Sizes
getDefaultMaxResultsSizes()
Get a list of the default maximum result row counts for each grouping level, e.g.java.util.List<java.lang.String>
getErrors()
Gets a list of strings containing all errors that have occurred so far during the current search.java.util.List<java.lang.String>
getHighlights()
Get any search query highlights that can be extracted from the query.Sizes
getStoreSize()
Get the store size configuration for this storeboolean
isComplete()
Find out if the search has completed.
-
-
-
Method Detail
-
destroy
void destroy()
Stop searching and destroy any stored data.
-
isComplete
boolean isComplete()
Find out if the search has completed. There will be no new results once complete so we can stop requesting updates.- Returns:
- True if the search has completed.
-
awaitCompletion
void awaitCompletion() throws java.lang.InterruptedException
Wait indefinitely for search to complete unless interrupted.- Throws:
java.lang.InterruptedException
- Thrown if the waiting thread is interrupted.
-
awaitCompletion
boolean awaitCompletion(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
Wait for search to complete unless interrupted or the wait timeout is exceeded.- Parameters:
timeout
- The timeout.unit
- The unit of the timeout.- Returns:
- True if search completed.
- Throws:
java.lang.InterruptedException
- Thrown if the waiting thread is interrupted.
-
getData
Data getData(java.lang.String componentId)
Get the current data that is available for the specified component.- Parameters:
componentId
- The id of the component that results are being populated for.- Returns:
- A store of current search results for the specified component.
-
getErrors
java.util.List<java.lang.String> getErrors()
Gets a list of strings containing all errors that have occurred so far during the current search.- Returns:
- A string containing all errors that have occurred so far during the current search.
-
getHighlights
java.util.List<java.lang.String> getHighlights()
Get any search query highlights that can be extracted from the query.- Returns:
- A set of strings found in the query that could be highlighted in the UI to show where the query terms have been found.
-
getDefaultMaxResultsSizes
Sizes getDefaultMaxResultsSizes()
Get a list of the default maximum result row counts for each grouping level, e.g. [100,10,1] means at most 100 rows for group level 0, 10 for each group level 1 and 1 for each group level 2- Returns:
- A list of
Integer
values, where the value represents the default maximum number of results at a grouping depth equal to the position in the list
-
-