@GuardedBy("txLock")
private void createTxChain() {
- Optional.ofNullable(txChainFactory).ifPresent(TransactionChain::close);
+ BindingTransactionChain txChainFactoryTemp = txChainFactory;
txChainFactory = dataBroker.createTransactionChain(TransactionChainManager.this);
+ Optional.ofNullable(txChainFactoryTemp).ifPresent(TransactionChain::close);
}
public void setLifecycleService(final LifecycleService lifecycleService) {
public void onTransactionChainFailed(final TransactionChain<?, ?> chain,
final AsyncTransaction<?, ?> transaction, final Throwable cause) {
if (transactionChainManagerStatus.equals(TransactionChainManagerStatus.WORKING)) {
- LOG.warn("txChain failed -> recreating due to {}", cause);
+ LOG.warn("Transaction chain failed, recreating chain due to ", cause);
recreateTxChain();
}
}
@Override
public void onFailure(@Nonnull final Throwable throwable) {
timeCounter.addTimeMark();
- LOG.warn("Statistics gathering for single node {} was not successful: ", deviceInfo.getLOGValue(), throwable.getMessage());
+ LOG.warn("Statistics gathering for single node {} was not successful: {}", deviceInfo.getLOGValue(),
+ throwable.getMessage());
if (LOG.isTraceEnabled()) {
LOG.trace("Gathering for node {} failure: ", deviceInfo.getLOGValue(), throwable);
}
this.isStatisticsPollingOff = isStatisticsPollingOff;
}
-}
\ No newline at end of file
+}