BatcherInfo batcher= new BatcherInfo();
if (engine instanceof PersistentProcessingEngineMXBean){
DBStorageMXBean dbStorageTmp = ((PersistentProcessingEngineMXBean)engine).getDBStorage();
storageInfo.setDescription(dbStorageTmp.getDescription());
if (dbStorageTmp instanceof ScottyDBStorageMXBean ){
BatcherMXBean batcherMXBean = ((ScottyDBStorageMXBean)dbStorageTmp).getBatcherMXBean();
if (batcherMXBean != null) {
batcher.setDescription(batcherMXBean.getDescription());
batcher.setNumThreads(batcherMXBean.getNumThreads());
}
}
}
storageInfo.setBatcher(batcher);