private final DataBroker dataBroker;
- private final ExecutorService statRpcMsgManagerExecutor;
private final ExecutorService statDataStoreOperationServ;
private EntityOwnershipService ownershipService;
private StatRpcMsgManager rpcMsgManager;
this.dataBroker = Preconditions.checkNotNull(dataBroker, "DataBroker can not be null!");
ThreadFactory threadFact;
threadFact = new ThreadFactoryBuilder().setNameFormat("odl-stat-rpc-oper-thread-%d").build();
- statRpcMsgManagerExecutor = Executors.newSingleThreadExecutor(threadFact);
threadFact = new ThreadFactoryBuilder().setNameFormat("odl-stat-ds-oper-thread-%d").build();
statDataStoreOperationServ = Executors.newSingleThreadExecutor(threadFact);
txChain = dataBroker.createTransactionChain(this);
portNotifyCommiter = new StatNotifyCommitPort(this, notifService, nodeRegistrator);
queueNotifyCommiter = new StatListenCommitQueue(this, dataBroker, notifService, nodeRegistrator);
- statRpcMsgManagerExecutor.execute(rpcMsgManager);
statDataStoreOperationServ.execute(this);
LOG.info("Statistics Manager started successfully!");
}
}
statCollectors = null;
}
- rpcMsgManager = close(rpcMsgManager);
- statRpcMsgManagerExecutor.shutdown();
+ rpcMsgManager = null;
statDataStoreOperationServ.shutdown();
txChain = close(txChain);
}