}
@Override
- public void onSessionDown(final Exception exception) {
+ public synchronized void onSessionDown(final Exception exception) {
// we want to tear down as we want to do clean up like closing the transaction chain, etc.
// even when datastore is not writable (routerYangIId == null / redundant session)
tearDown();
}
@Override
- public void onTransactionChainFailed(final TransactionChain<?, ?> chain, final AsyncTransaction<?, ?> transaction,
+ public synchronized void onTransactionChainFailed(final TransactionChain<?, ?> chain,
+ final AsyncTransaction<?, ?> transaction,
final Throwable cause) {
LOG.error("Transaction chain failed.", cause);
}
LOG.debug("Transaction chain {} successfully.", chain);
}
- private boolean isDatastoreWritable() {
+ private synchronized boolean isDatastoreWritable() {
return (this.routerYangIId != null);
}