diff options
author | 2019-04-08 11:37:45 +0200 | |
---|---|---|
committer | 2019-04-08 11:37:45 +0200 | |
commit | b16cea20258ba537db7c0755208c82ab93331ff7 (patch) | |
tree | 8a5a3c87069b9ce700c34323e75ff434e7acae97 /infra/cfg-init/src/main | |
parent | 23979469bcf8cd312cb3ec9e9e548003110f68f4 (diff) |
HONEYCOMB-443: ODL bump to Neon
- bumps ODL dependencies to neon
- migrates guava optional to java.utils.optional
Change-Id: Ibdaa365c7e21a341103aba88dfd67277e40d2969
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'infra/cfg-init/src/main')
-rw-r--r-- | infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/RestoringInitializer.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/RestoringInitializer.java b/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/RestoringInitializer.java index 4488f8342..20085803a 100644 --- a/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/RestoringInitializer.java +++ b/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/RestoringInitializer.java @@ -24,11 +24,11 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardOpenOption; +import java.util.concurrent.ExecutionException; import javax.annotation.Nonnull; -import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException; -import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; -import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction; +import org.opendaylight.mdsal.common.api.LogicalDatastoreType; +import org.opendaylight.mdsal.dom.api.DOMDataBroker; +import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction; import org.opendaylight.mdsal.dom.api.DOMSchemaService; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; @@ -90,7 +90,7 @@ public class RestoringInitializer implements DataTreeInitializer { try { final ContainerNode containerNode = jsonReader.readData(schemaService.getGlobalContext(), path); - final DOMDataWriteTransaction domDataWriteTransaction = dataTree.newWriteOnlyTransaction(); + final DOMDataTreeWriteTransaction domDataWriteTransaction = dataTree.newWriteOnlyTransaction(); for (DataContainerChild<? extends YangInstanceIdentifier.PathArgument, ?> dataContainerChild : containerNode .getValue()) { final YangInstanceIdentifier iid = YangInstanceIdentifier.create(dataContainerChild.getIdentifier()); @@ -110,11 +110,11 @@ public class RestoringInitializer implements DataTreeInitializer { } // Block here to prevent subsequent initializers processing before context is fully restored - domDataWriteTransaction.submit().checkedGet(); + domDataWriteTransaction.commit().get(); LOG.debug("Data from {} restored successfully", path); - } catch (IOException | TransactionCommitFailedException e) { - throw new InitializeException("Unable to restore data from " + path, e); + } catch (IOException | InterruptedException | ExecutionException ex) { + throw new InitializeException("Unable to restore data from " + path, ex); } } |