} while (op != null);
LOG.debug("Processed {} operations, submitting transaction", ops);
-
- try {
- tx.submit().checkedGet();
- } catch (final TransactionCommitFailedException e) {
- LOG.warn("Stat DataStoreOperation unexpected State!", e);
- transactionChain.close();
- transactionChain = dataBroker.createTransactionChain(this);
- cleanDataStoreOperQueue();
- }
-
+ submitTransaction(tx);
} catch (final IllegalStateException e) {
LOG.warn("Stat DataStoreOperation unexpected State!", e);
transactionChain.close();
cleanDataStoreOperQueue();
} catch (final InterruptedException e) {
// This should mean we're shutting down.
- LOG.debug("Stat Manager DS Operation thread interupted!", e);
+ LOG.debug("Stat Manager DS Operation thread interrupted!", e);
finishing = true;
} catch (final Exception e) {
LOG.warn("Stat DataStore Operation executor fail!", e);
cleanDataStoreOperQueue();
}
+ private void submitTransaction(ReadWriteTransaction tx) {
+ try {
+ tx.submit().checkedGet();
+ } catch (final TransactionCommitFailedException e) {
+ LOG.warn("Stat DataStoreOperation unexpected State!", e);
+ transactionChain.close();
+ transactionChain = dataBroker.createTransactionChain(this);
+ cleanDataStoreOperQueue();
+ }
+ }
+
private void cleanDataStoreOperQueue() {
while (!queue.isEmpty()) {
queue.poll();