public class ElasticFeedbackRepository extends Object implements FeedbackRepository
Constructor and Description |
---|
ElasticFeedbackRepository(io.searchbox.client.JestClient jestClient,
IndexStrategy indexStrategy,
int bulkRetryCount,
ElasticFeedbackRepositoryInitializer initializer) |
Modifier and Type | Method and Description |
---|---|
List<AlarmFeedback> |
getAllFeedback() |
Collection<AlarmFeedback> |
getFeedback(String situationKey) |
List<String> |
getTags(String prefix) |
void |
onBind(AlarmFeedbackListener alarmFeedbackListener,
Map properties)
Add listeners to
alarmFeedbackListeners during runtime as they become available. |
void |
onUnbind(AlarmFeedbackListener alarmFeedbackListener,
Map properties)
Remove listeners from
alarmFeedbackListeners during runtime as they become unavailable. |
void |
persist(List<AlarmFeedback> feedback)
|
public ElasticFeedbackRepository(io.searchbox.client.JestClient jestClient, IndexStrategy indexStrategy, int bulkRetryCount, ElasticFeedbackRepositoryInitializer initializer)
public void persist(List<AlarmFeedback> feedback) throws FeedbackException
FeedbackRepository
persist
in interface FeedbackRepository
feedback
- the feedback to persistFeedbackException
- if the feedback could not be persistedpublic Collection<AlarmFeedback> getFeedback(String situationKey) throws FeedbackException
getFeedback
in interface FeedbackRepository
situationKey
- the reduction key of the situation to get feedback forFeedbackException
public List<AlarmFeedback> getAllFeedback() throws FeedbackException
getAllFeedback
in interface FeedbackRepository
FeedbackException
public List<String> getTags(String prefix) throws FeedbackException
getTags
in interface FeedbackRepository
FeedbackException
public void onBind(AlarmFeedbackListener alarmFeedbackListener, Map properties)
alarmFeedbackListeners
during runtime as they become available.public void onUnbind(AlarmFeedbackListener alarmFeedbackListener, Map properties)
alarmFeedbackListeners
during runtime as they become unavailable.Copyright © 2021. All rights reserved.