Re: [controller-dev] TransactionChain

2016-09-15 Thread Sela, Guy
Thank you. From: Tom Pantelis [mailto:tompante...@gmail.com] Sent: Thursday, September 15, 2016 4:06 PM To: Sela, Guy Cc: mdsal-...@lists.opendaylight.org; controller-dev@lists.opendaylight.org Subject: Re: [controller-dev] TransactionChain I assume you mean: Future f = t1.submit

Re: [controller-dev] TransactionChain

2016-09-15 Thread Tom Pantelis
I assume you mean: Future *f* = t1.submit(); Futures.addCallback(*f*, new Callback{ AsyncReadTransaction t2 = broker.newReadOnlyTransaction(); Optional maybeData = t2.read(id).get(); } yes that would accomplish the result that the TransactionChain provides. But with TransactionChain, you don't ha

[controller-dev] TransactionChain

2016-09-15 Thread Sela, Guy
Does this entity exist only to solve the problem in the javadoc? " AsyncWriteTransaction t1 = broker.newWriteOnlyTransaction(); t1.put(id, data); t1.submit(); AsyncReadTransaction t2 = broker.newReadOnlyTransaction(); Optional maybeData = t2.read(id).get(); " Can't it be solved with this code?