@Override public Object getIdentifier() { return delegate.getIdentifier(); }
@Override public void onFailure(final Throwable t) { // we do nothing but print out the log. Transaction chain restart will be done in #onTransactionChainFailed() LOG.error("Failed to propagate change (transaction {}) by listener {}", trans.getIdentifier(), AbstractTopologyBuilder.this, t); } });
public void onSuccess(Object o) { LOG.trace("tx {} succeeded", tx.getIdentifier()); }
@Override public void onSuccess(final Void result) { // as we are enforcing trans.submit(), in some cases the transaction execution actually could be successfully even when an // exception is captured, thus #onTransactionChainFailed() never get invoked. Though the transaction chain remains usable, // the data loss will not be able to be recovered. Thus we schedule a listener restart here if (transactionInError.get()) { LOG.warn("Transaction {} committed successfully while exception captured. Rescheduling a restart of listener {}", trans .getIdentifier(), AbstractTopologyBuilder.this); scheduleListenerRestart(); } else { LOG.trace("Transaction {} committed successfully", trans.getIdentifier()); } }
public void onFailure(Throwable t) { if (t instanceof OptimisticLockFailedException) { if ((tries - 1) > 0) { LOG.warn("tx {} failed, retrying", tx.getIdentifier()); // do retry submitTransaction(tx, tries - 1); } else { LOG.warn("tx {} failed, out of retries", tx.getIdentifier()); // out of retries chainFailure(); } } else { // failed due to another type of // TransactionCommitFailedException. LOG.warn("tx {} failed: {}", tx.getIdentifier(), t.getMessage()); chainFailure(); } } });
public void updateDeviceState(final boolean up, final Set<QName> capabilities) { final org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node data = buildDataForDeviceState( up, capabilities, id); final ReadWriteTransaction transaction = txChain.newReadWriteTransaction(); logger.trace("{}: Update device state transaction {} merging operational data started.", id, transaction.getIdentifier()); transaction.put(LogicalDatastoreType.OPERATIONAL, id.getBindingPath(), data); logger.trace("{}: Update device state transaction {} merging operational data ended.", id, transaction.getIdentifier()); commitTransaction(transaction, "update"); }
LOG.debug("Received data change {} event with transaction {}", changes, trans.getIdentifier()); final AtomicBoolean transactionInError = new AtomicBoolean(false); for (final DataTreeModification<T> change : changes) { routeChanged(change, trans); } catch (final RuntimeException e) { LOG.warn("Data change {} (transaction {}) was not completely propagated to listener {}", change, trans.getIdentifier(), this, e);
StatDataStoreOperation op = dataStoreOperQueue.take(); final ReadWriteTransaction tx = txChain.newReadWriteTransaction(); LOG.trace("New operations available, starting transaction {}", tx.getIdentifier()); LOG.trace("Processed {} operations, submitting transaction {}", ops, tx.getIdentifier());
LOG.debug("Processed {} operations, submitting transaction {}", opsToApply.size(), tx.getIdentifier()); try { tx.submit();
op = dataStoreOperQueue.take(); final ReadWriteTransaction tx = txChain.newReadWriteTransaction(); LOG.trace("New operations available, starting transaction {}", tx.getIdentifier()); LOG.trace("Processed {} operations, submitting transaction {}", ops, tx.getIdentifier());