use of org.apache.metron.indexing.InMemoryMetaAlertRetrieveLatestDao in project metron by apache.
the class InMemoryMetaAlertDao method init.
@Override
public void init(IndexDao indexDao, Optional<String> threatSort) {
this.indexDao = indexDao;
this.metaAlertRetrieveLatestDao = new InMemoryMetaAlertRetrieveLatestDao(indexDao);
Supplier<Map<String, Object>> globalConfigSupplier = () -> new HashMap<>();
MetaAlertConfig config = new MetaAlertConfig(METAALERT_INDEX, null, globalConfigSupplier) {
@Override
protected String getDefaultThreatTriageField() {
return MetaAlertConstants.THREAT_FIELD_DEFAULT;
}
@Override
protected String getDefaultSourceTypeField() {
return SENSOR_TYPE;
}
};
this.metaAlertUpdateDao = new InMemoryMetaAlertUpdateDao(indexDao, metaAlertRetrieveLatestDao, config, -1);
// Ignore threatSort for test.
}
Aggregations