Пример #1
0
 public long run() {
   ModelWrapper mw = ruleEngine.run();
   if (!mwMap.containsKey(contextTimeframe)) {
     mwMap.put(contextTimeframe, new CircularFifoQueue<ModelWrapper>(ModelWrapperQueueMax));
   }
   mwMap.get(contextTimeframe).add(mw);
   return mw.get().size();
 }
Пример #2
0
  // mainly a re-init
  public void init() {
    AggMethodRegistry.init(); // TODO-can this live elsewhere?

    instAbox = new ModelWrapper("instAbox");
    instAbox.addListener(new ReleaseListener(".*_[0-9][0-9][0-9]+$", 100));
    ListenerPublisher lp = new ListenerPublisher(listenParms);

    instAbox.addListener(lp);
    lp.subscribe(this);
    ruleEngine.setAbox(instAbox);
    mwMap = new HashMap<String, CircularFifoQueue<ModelWrapper>>();
    ruleEngine.init();
  }