BUG-5280: use a lambda for createLocalHistory()/close() 74/39574/38
authorRobert Varga <rovarga@cisco.com>
Sun, 29 May 2016 21:34:14 +0000 (23:34 +0200)
committerRobert Varga <rovarga@cisco.com>
Tue, 21 Jun 2016 08:54:31 +0000 (10:54 +0200)
commit520c692c4a35fad2ac10e87314e44c07c15b6aaa
treee04e332b57887bac02326f1eedaba5abbaa8f794
parentd8bc95c84030468dfe7d04b72499d798dd374331
BUG-5280: use a lambda for createLocalHistory()/close()

These are internal commands, which can be efficiently implemented
using a simple delayed execution primitive.

Introduce ClientActorContext#executeInActor(), which will wrap
a specialized subclass of Runnable and send it to the actor.

This can be used to dispatch lambdas to methods, reducing the need
for specialized messages and instanceof checks.

Change-Id: Id5cd388657a274d551892a6c943b062d70c7bea7
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/CreateLocalHistoryCommand.java [deleted file]
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/DistributedDataStoreClientBehavior.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/actors/client/ClientActorBehavior.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/actors/client/ClientActorContext.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/actors/client/InternalCommand.java [new file with mode: 0644]