Relax visibility on FrontendReadWriteTransaction methods 18/55818/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 21 Apr 2017 13:38:03 +0000 (15:38 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 21 Apr 2017 14:53:20 +0000 (16:53 +0200)
We are invoking these methods from anonymous subclasses, hence
keeping them private forces redirection via synthetic accessors:

 at org.opendaylight.controller.cluster.datastore.FrontendReadWriteTransaction.successfulDirectCanCommit
 at org.opendaylight.controller.cluster.datastore.FrontendReadWriteTransaction.access$300
 at org.opendaylight.controller.cluster.datastore.FrontendReadWriteTransaction$5.onSuccess

This patch makes the methods package-private, which will eliminate
the accessor, improving the stack trace.

Change-Id: Idbd803c43d7ed7333fc392a17edaf61c9721d76f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/FrontendReadWriteTransaction.java

index 0990953..d80488c 100644 (file)
@@ -198,7 +198,7 @@ final class FrontendReadWriteTransaction extends FrontendTransaction {
         });
     }
 
-    private void successfulDirectCanCommit(final RequestEnvelope envelope, final long startTime) {
+    void successfulDirectCanCommit(final RequestEnvelope envelope, final long startTime) {
         readyCohort.preCommit(new FutureCallback<DataTreeCandidate>() {
             @Override
             public void onSuccess(final DataTreeCandidate result) {
@@ -213,7 +213,7 @@ final class FrontendReadWriteTransaction extends FrontendTransaction {
         });
     }
 
-    private void successfulDirectPreCommit(final RequestEnvelope envelope, final long startTime) {
+    void successfulDirectPreCommit(final RequestEnvelope envelope, final long startTime) {
         readyCohort.commit(new FutureCallback<UnsignedLong>() {
             @Override
             public void onSuccess(final UnsignedLong result) {
@@ -228,7 +228,7 @@ final class FrontendReadWriteTransaction extends FrontendTransaction {
         });
     }
 
-    private void successfulCommit(final RequestEnvelope envelope, final long startTime) {
+    void successfulCommit(final RequestEnvelope envelope, final long startTime) {
         recordAndSendSuccess(envelope, startTime, new TransactionCommitSuccess(readyCohort.getIdentifier(),
             envelope.getMessage().getSequence()));
         readyCohort = null;

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.