test_class.declarator: caller
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private RulesEngineCaller<Object, Object> caller;
test_class.type: RulesEngineCaller<Object, Object>
test_class.var_name: caller
test_class.declarator: testFactory
test_class.modifier: private
test_class.original_string: private TestFactory testFactory;
test_class.type: TestFactory
test_class.var_name: testFactory
test_class.declarator: engine
test_class.modifier: private
test_class.original_string: private StatelessRulesEngine<Object, Object> engine;
test_class.type: StatelessRulesEngine<Object, Object>
test_class.var_name: engine
test_class.file: wraith-engine/src/test/java/io/symcpe/wraith/rules/TestStatelessRulesEngine.java
test_class.identifier: TestStatelessRulesEngine
test_case.body: @Test
  	public void testUpdateRule() throws Exception {
  		// test RE with no pre-loaded rules
  		engine.initializeRules(new HashMap<>());
  		engine.updateRule(null,
  				RuleSerializer.serializeRuleToJSONString(new SimpleRule((short) 1123, "test1", true,
  						new EqualsCondition("host", "val"), new TemplatedAlertAction((short) 2, (short) 2)), false),
  				false);
  		Map<Short, Rule> rule = engine.getRuleMap();
  		assertEquals(1, rule.size());
  		// test RE with pre-loaded rules
  		engine = new StatelessRulesEngine<>(caller, testFactory, testFactory);
  		Map<String, String> conf = new HashMap<>();
  		conf.put(TestFactory.RULES_CONTENT,
  				RuleSerializer.serializeRulesToJSONString(Arrays.asList(new SimpleRule((short) 1122, "test1", true,
  						new EqualsCondition("host", "val"), new TemplatedAlertAction((short) 2, (short) 2))), false));
  		engine.initializeRules(conf);
  		engine.updateRule(null,
  				RuleSerializer.serializeRuleToJSONString(new SimpleRule((short) 1123, "test1", true,
  						new EqualsCondition("host", "val"), new TemplatedAlertAction((short) 2, (short) 2)), false),
  				false);
  		rule = engine.getRuleMap();
  		assertEquals(2, rule.size());
  	}
test_case.class_method_signature: TestStatelessRulesEngine.testUpdateRule()
test_case.full_signature: @Test public void testUpdateRule()
test_case.identifier: testUpdateRule
test_case.invocations: initializeRules updateRule serializeRuleToJSONString getRuleMap assertEquals size put serializeRulesToJSONString asList initializeRules updateRule serializeRuleToJSONString getRuleMap assertEquals size
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUpdateRule()
focal_class.declarator: logger = LoggerFactory.getLogger(StatelessRulesEngine.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(StatelessRulesEngine.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: ruleMap
focal_class.modifier: private
focal_class.original_string: private Map<Short, Rule> ruleMap;
focal_class.type: Map<Short, Rule>
focal_class.var_name: ruleMap
focal_class.declarator: ruleGroupMap
focal_class.modifier: private
focal_class.original_string: private Map<String, Map<Short, Rule>> ruleGroupMap;
focal_class.type: Map<String, Map<Short, Rule>>
focal_class.var_name: ruleGroupMap
focal_class.declarator: caller
focal_class.modifier: private
focal_class.original_string: private RulesEngineCaller<K, C> caller;
focal_class.type: RulesEngineCaller<K, C>
focal_class.var_name: caller
focal_class.declarator: eventFactory
focal_class.modifier: private
focal_class.original_string: private EventFactory eventFactory;
focal_class.type: EventFactory
focal_class.var_name: eventFactory
focal_class.declarator: storeFactory
focal_class.modifier: private
focal_class.original_string: private StoreFactory storeFactory;
focal_class.type: StoreFactory
focal_class.var_name: storeFactory
focal_class.declarator: ruleGroupsActive
focal_class.modifier: private
focal_class.original_string: private boolean ruleGroupsActive;
focal_class.type: boolean
focal_class.var_name: ruleGroupsActive
focal_class.declarator: hashSize
focal_class.modifier: private
focal_class.original_string: private int hashSize;
focal_class.type: int
focal_class.var_name: hashSize
focal_class.file: wraith-engine/src/main/java/io/symcpe/wraith/rules/StatelessRulesEngine.java
focal_class.identifier: StatelessRulesEngine
focal_class.class_method_signature: StatelessRulesEngine.StatelessRulesEngine(RulesEngineCaller<K, C> caller, EventFactory eventFactory, StoreFactory storeFactory)
focal_class.full_signature: public  StatelessRulesEngine(RulesEngineCaller<K, C> caller, EventFactory eventFactory, StoreFactory storeFactory)
focal_class.identifier: StatelessRulesEngine
focal_class.modifiers: public
focal_class.parameters: (RulesEngineCaller<K, C> caller, EventFactory eventFactory, StoreFactory storeFactory)
focal_class.signature:  StatelessRulesEngine(RulesEngineCaller<K, C> caller, EventFactory eventFactory, StoreFactory storeFactory)
focal_class.class_method_signature: StatelessRulesEngine.initializeRules(Map<String, String> conf)
focal_class.full_signature: public void initializeRules(Map<String, String> conf)
focal_class.identifier: initializeRules
focal_class.modifiers: public
focal_class.parameters: (Map<String, String> conf)
focal_class.return: void
focal_class.signature: void initializeRules(Map<String, String> conf)
focal_class.class_method_signature: StatelessRulesEngine.updateRuleMap(Map<Short, Rule> ruleMap, String ruleJson, boolean delete)
focal_class.full_signature: public static Rule updateRuleMap(Map<Short, Rule> ruleMap, String ruleJson, boolean delete)
focal_class.identifier: updateRuleMap
focal_class.modifiers: public static
focal_class.parameters: (Map<Short, Rule> ruleMap, String ruleJson, boolean delete)
focal_class.return: Rule
focal_class.signature: Rule updateRuleMap(Map<Short, Rule> ruleMap, String ruleJson, boolean delete)
focal_class.class_method_signature: StatelessRulesEngine.updateRule(String ruleGroup, String ruleJson, boolean delete)
focal_class.full_signature: public void updateRule(String ruleGroup, String ruleJson, boolean delete)
focal_class.identifier: updateRule
focal_class.modifiers: public
focal_class.parameters: (String ruleGroup, String ruleJson, boolean delete)
focal_class.return: void
focal_class.signature: void updateRule(String ruleGroup, String ruleJson, boolean delete)
focal_class.class_method_signature: StatelessRulesEngine.evaluateEventAgainstAllRules(C eventCollector, K eventContainer, Event event)
focal_class.full_signature: public void evaluateEventAgainstAllRules(C eventCollector, K eventContainer, Event event)
focal_class.identifier: evaluateEventAgainstAllRules
focal_class.modifiers: public
focal_class.parameters: (C eventCollector, K eventContainer, Event event)
focal_class.return: void
focal_class.signature: void evaluateEventAgainstAllRules(C eventCollector, K eventContainer, Event event)
focal_class.class_method_signature: StatelessRulesEngine.evaluateEventAgainstGroupedRules(C eventCollector, K eventContainer, Event event)
focal_class.full_signature: public void evaluateEventAgainstGroupedRules(C eventCollector, K eventContainer, Event event)
focal_class.identifier: evaluateEventAgainstGroupedRules
focal_class.modifiers: public
focal_class.parameters: (C eventCollector, K eventContainer, Event event)
focal_class.return: void
focal_class.signature: void evaluateEventAgainstGroupedRules(C eventCollector, K eventContainer, Event event)
focal_class.class_method_signature: StatelessRulesEngine.evaluateEventAgainstRule(String ruleGroup, Rule rule, C eventCollector, K eventContainer, Event event)
focal_class.full_signature: public void evaluateEventAgainstRule(String ruleGroup, Rule rule, C eventCollector, K eventContainer, Event event)
focal_class.identifier: evaluateEventAgainstRule
focal_class.modifiers: public
focal_class.parameters: (String ruleGroup, Rule rule, C eventCollector, K eventContainer, Event event)
focal_class.return: void
focal_class.signature: void evaluateEventAgainstRule(String ruleGroup, Rule rule, C eventCollector, K eventContainer, Event event)
focal_class.class_method_signature: StatelessRulesEngine.applyRuleAction(C eventCollector, K eventContainer, Event event, Rule rule, Action action)
focal_class.full_signature: protected void applyRuleAction(C eventCollector, K eventContainer, Event event, Rule rule, Action action)
focal_class.identifier: applyRuleAction
focal_class.modifiers: protected
focal_class.parameters: (C eventCollector, K eventContainer, Event event, Rule rule, Action action)
focal_class.return: void
focal_class.signature: void applyRuleAction(C eventCollector, K eventContainer, Event event, Rule rule, Action action)
focal_class.class_method_signature: StatelessRulesEngine.getRuleMap()
focal_class.full_signature: public Map<Short, Rule> getRuleMap()
focal_class.identifier: getRuleMap
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<Short, Rule>
focal_class.signature: Map<Short, Rule> getRuleMap()
focal_class.class_method_signature: StatelessRulesEngine.getRuleGroupMap()
focal_class.full_signature: public Map<String, Map<Short, Rule>> getRuleGroupMap()
focal_class.identifier: getRuleGroupMap
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<String, Map<Short, Rule>>
focal_class.signature: Map<String, Map<Short, Rule>> getRuleGroupMap()
focal_class.class_method_signature: StatelessRulesEngine.isRuleGroupsActive()
focal_class.full_signature: public boolean isRuleGroupsActive()
focal_class.identifier: isRuleGroupsActive
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isRuleGroupsActive()
focal_class.class_method_signature: StatelessRulesEngine.getHashSize()
focal_class.full_signature: public int getHashSize()
focal_class.identifier: getHashSize
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getHashSize()
focal_method.body: public void updateRule(String ruleGroup, String ruleJson, boolean delete) throws Exception {
  		Map<Short, Rule> ruleMap = this.ruleMap;
  		if (ruleGroupsActive) {
  			if (ruleGroup != null) {
  				ruleMap = ruleGroupMap.get(ruleGroup);
  				if (ruleMap == null) {
  					ruleMap = new LinkedHashMap<>(hashSize);
  					ruleGroupMap.put(ruleGroup, ruleMap);
  				}
  			} else {
  				throw new PerformantException("Supplied rule group is null");
  			}
  		}
  		if (ruleMap == null) {
  			throw new PerformantException("Rule map not found for rule:" + ruleJson + "\trule-group:" + ruleGroup);
  		}
  		updateRuleMap(ruleMap, ruleJson, delete);
  	}
focal_method.class_method_signature: StatelessRulesEngine.updateRule(String ruleGroup, String ruleJson, boolean delete)
focal_method.full_signature: public void updateRule(String ruleGroup, String ruleJson, boolean delete)
focal_method.identifier: updateRule
focal_method.invocations: get put updateRuleMap
focal_method.modifiers: public
focal_method.parameters: (String ruleGroup, String ruleJson, boolean delete)
focal_method.return: void
focal_method.signature: void updateRule(String ruleGroup, String ruleJson, boolean delete)