Class ElasticFeedbackRepository
- java.lang.Object
-
- org.opennms.features.situationfeedback.elastic.ElasticFeedbackRepository
-
- All Implemented Interfaces:
FeedbackRepository
public class ElasticFeedbackRepository extends Object implements FeedbackRepository
-
-
Constructor Summary
Constructors Constructor Description ElasticFeedbackRepository(io.searchbox.client.JestClient jestClient, IndexStrategy indexStrategy, int bulkRetryCount, ElasticFeedbackRepositoryInitializer initializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<AlarmFeedback>getAllFeedback()Collection<AlarmFeedback>getFeedback(String situationKey)List<String>getTags(String prefix)voidonBind(AlarmFeedbackListener alarmFeedbackListener, Map properties)Add listeners toalarmFeedbackListenersduring runtime as they become available.voidonUnbind(AlarmFeedbackListener alarmFeedbackListener, Map properties)Remove listeners fromalarmFeedbackListenersduring runtime as they become unavailable.voidpersist(List<AlarmFeedback> feedback)
-
-
-
Constructor Detail
-
ElasticFeedbackRepository
public ElasticFeedbackRepository(io.searchbox.client.JestClient jestClient, IndexStrategy indexStrategy, int bulkRetryCount, ElasticFeedbackRepositoryInitializer initializer)
-
-
Method Detail
-
persist
public void persist(List<AlarmFeedback> feedback) throws FeedbackException
Description copied from interface:FeedbackRepository- Specified by:
persistin interfaceFeedbackRepository- Parameters:
feedback- the feedback to persist- Throws:
FeedbackException- if the feedback could not be persisted
-
getFeedback
public Collection<AlarmFeedback> getFeedback(String situationKey) throws FeedbackException
- Specified by:
getFeedbackin interfaceFeedbackRepository- Parameters:
situationKey- the reduction key of the situation to get feedback for- Returns:
- all of the feedback applicable to the given situation
- Throws:
FeedbackException
-
getAllFeedback
public List<AlarmFeedback> getAllFeedback() throws FeedbackException
- Specified by:
getAllFeedbackin interfaceFeedbackRepository- Returns:
- all of the feedback present in the repository
- Throws:
FeedbackException
-
getTags
public List<String> getTags(String prefix) throws FeedbackException
- Specified by:
getTagsin interfaceFeedbackRepository- Returns:
- a list of unique SituationFeedback Tags filtered to include only those beginning with @prefix
- Throws:
FeedbackException
-
onBind
public void onBind(AlarmFeedbackListener alarmFeedbackListener, Map properties)
Add listeners toalarmFeedbackListenersduring runtime as they become available.
-
onUnbind
public void onUnbind(AlarmFeedbackListener alarmFeedbackListener, Map properties)
Remove listeners fromalarmFeedbackListenersduring runtime as they become unavailable.
-
-