src/main/java/com/feedzai/fos/impl/weka/WekaScorer.java
public void addOrUpdate(WekaModelConfig wekaModelConfig) throws FOSException {
        checkNotNull(wekaModelConfig, "Model config cannot be null");

        WekaThreadSafeScorer newWekaThreadSafeScorer = new WekaThreadSafeScorerPool(wekaModelConfig, wekaManagerConfig);
        WekaThreadSafeScorer oldWekaThreadSafeScorer = quickSwitch(wekaModelConfig.getId(), newWekaThreadSafeScorer);

        WekaUtils.closeSilently(oldWekaThreadSafeScorer);
    }
public void addOrUpdate(WekaModelConfig wekaModelConfig) throws FOSException {
        checkNotNull(wekaModelConfig, "Model config cannot be null");

        WekaThreadSafeScorer newWekaThreadSafeScorer = new WekaThreadSafeScorerPool(wekaModelConfig, wekaManagerConfig);
        WekaThreadSafeScorer oldWekaThreadSafeScorer = quickSwitch(wekaModelConfig.getId(), newWekaThreadSafeScorer);

        WekaUtils.closeSilently(oldWekaThreadSafeScorer);
    }
Adds the given model to the managed models.

<p> If the provided model id already exists, then the older model is removed and the new one is instantiated.

@param wekaModelConfig the configuration of the new model
@throws FOSException when the new model could not be instantiated