@Override
public void trainOnInstanceImpl(Instance inst) {
try {
lock.acquire();
//Get a new classifier
Classifier newClassifier = ((Classifier) getPreparedClassOption(this.baseLearnerOption)).copy();
ensemble.add(new ClassifierInstance(newClassifier));
//If we have too many classifiers
while(ensemble.size() > ensembleSizeOption.getValue())
ensemble.pollFirst();