Convert OperationCompleter to OperationLimiter 54/20754/11
authorRobert Varga <rovarga@cisco.com>
Tue, 19 May 2015 19:50:12 +0000 (21:50 +0200)
committerRobert Varga <rovarga@cisco.com>
Mon, 8 Jun 2015 17:19:42 +0000 (19:19 +0200)
commitb2af021ee27b2977961f0fec6f8bb1a4acbcdbd7
tree02f14b4048fd2f92a41205669627762a2655ebb4
parentab8ed1ce780ed2019ddeb4a1b890e7e5f442fe90
Convert OperationCompleter to OperationLimiter

The completer and limiter functions are related to each other, so
encapsulate them in a single object.

Since a TransactionProxy cannot really do anything without touching the
limiter, make sure we instantiate it in constructor, preventing some
volatile reads in the fast path.

Change-Id: I4cf31ef46c11676611a62db7a794f504712ce5af
Signed-off-by: Robert Varga <rovarga@cisco.com>
13 files changed:
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionContextFactory.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalTransactionContext.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/NoOpTransactionContext.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/OperationCompleter.java [deleted file]
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/OperationLimiter.java [new file with mode: 0644]
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/RemoteTransactionContext.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/RemoteTransactionContextSupport.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionContextWrapper.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/compat/PreLithiumTransactionContextImpl.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/LocalTransactionContextTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/OperationCompleterTest.java [deleted file]
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/OperationLimiterTest.java [new file with mode: 0644]