Interface RuleInsightStore
- All Known Implementing Classes:
JiraRuleInsightStore
public interface RuleInsightStore
-
Method Summary
Modifier and TypeMethodDescriptiongetInsightCategoryDetailsEarlierThan(Environment environment, RollupType type, State category, Instant earlierThan) Returns the list of insight details for the given category, and earlier than the given time instantgetInsights(TenantContext context, RollupType type, InsightFilter filter, InsightSort sort, int limit) Retrieves insight data aggregated by rulegetMostRecentInsightTime(Environment environment, RollupType type) Returns the time instant of the last populated insightgetRuleExecutionState(Environment environment, Long ruleId, Instant created, Long auditId) Returns the state of the first statistic searched by rule ID and creation timegetTimeSeries(TenantContext context, RollupType type, InsightFilter filter) Retrieves insight data as time series datavoidpopulateInsights(Environment environment, RollupType type, Instant startInclusive, Instant endExclusive) Populates insights rollup data from the given start instant (inclusive) to the end (exclusive)voidremoveInsightsOlderThan(Environment environment, RollupType type, Instant olderThan) Removes insight rollup data for the given type and instantvoidupdateInsight(Environment environment, RollupType type, Integer insightId, State state, Long auditId) Update the state of the given insight by its ID
-
Method Details
-
populateInsights
void populateInsights(Environment environment, RollupType type, Instant startInclusive, Instant endExclusive) Populates insights rollup data from the given start instant (inclusive) to the end (exclusive)- Parameters:
environment- Given instant environmenttype- Type of rollup to perform againststartInclusive- Instant to populate form (inclusive)endExclusive- Instant to populate to (exclusive)
-
updateInsight
void updateInsight(Environment environment, RollupType type, Integer insightId, State state, Long auditId) Update the state of the given insight by its ID- Parameters:
environment- Given instant environmenttype- Type of rollup to perform againstinsightId- ID of the given insightauditId- Audit ID of the given insightstate- A new state to be set for a given insight
-
getRuleExecutionState
Optional<String> getRuleExecutionState(Environment environment, Long ruleId, Instant created, Long auditId) Returns the state of the first statistic searched by rule ID and creation time- Parameters:
environment- Given instant environmentruleId- Rule ID of a statistic we are looking forcreated- Creation time of a statistic we are looking forauditId- Audit ID of a statistic we are looking for- Returns:
- Statistic state in string or empty
-
getMostRecentInsightTime
Returns the time instant of the last populated insight- Parameters:
environment- Given instant environmenttype- Type of rollup to perform against- Returns:
- Instant of the last populate insight or empty
-
getInsightCategoryDetailsEarlierThan
List<RuleInsightDetails> getInsightCategoryDetailsEarlierThan(Environment environment, RollupType type, State category, Instant earlierThan) Returns the list of insight details for the given category, and earlier than the given time instant- Parameters:
environment- Given instance environmenttype- Type of rollup to perform againstcategory- Category to useearlierThan- Instant to include rows earlier than (exclusive)- Returns:
- List of RuleInsightDetails objects that contain insight ID, rule ID, and creation time
-
removeInsightsOlderThan
Removes insight rollup data for the given type and instant- Parameters:
environment- Given instance environmenttype- Type of rollup to perform againstolderThan- Instant to remove rows older than (exclusive)
-
getInsights
RuleInsightResult getInsights(TenantContext context, RollupType type, InsightFilter filter, InsightSort sort, int limit) Retrieves insight data aggregated by rule- Parameters:
context- Given instance environmenttype- Type of rollup to perform againstfilter- Filter query objectlimit- Number of rules results to return- Returns:
- Rule insight results
-
getTimeSeries
Retrieves insight data as time series data- Parameters:
context- Given instance environmenttype- Type of rollup to perform againstfilter- Filter query object- Returns:
- Time series result with an entry for each time unit (including empty values)
-