What is the purpose of cancel() API in ReadWriteTransaction?

asked 2016-07-12 16:24:01 -0700

tsubasa gravatar image

Hi, I am trying to write the data into MD-SAL and want to know what should I do when I fail transaction and get exceptions. I found a good tutorial in the javadoc of submit() API.(https://github.com/opendaylight/controller/blob/master/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncWriteTransaction.java) This tutorial does use cancel() API. But, sdnhub tutorial(http://sdnhub.org/tutorials/opendaylight/) use cancel() API. So, which implememtation pattern is correct? If I don't call cancel() API when I get exception, what will happen?

edit retag flag offensive close merge delete