Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix logging messages
[controller.git]
/
opendaylight
/
md-sal
/
sal-distributed-datastore
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
sharding
/
ShardedDataTreeActor.java
diff --git
a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/ShardedDataTreeActor.java
b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/ShardedDataTreeActor.java
index 8e8ff491d3088db64eb1c013c3ae2cb2433b1221..679055fa2fd3fd79d243b7214603870279ca3bff 100644
(file)
--- a/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/ShardedDataTreeActor.java
+++ b/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/ShardedDataTreeActor.java
@@
-41,7
+41,7
@@
import org.opendaylight.controller.cluster.common.actor.AbstractUntypedPersisten
import org.opendaylight.controller.cluster.datastore.AbstractDataStore;
import org.opendaylight.controller.cluster.datastore.ClusterWrapper;
import org.opendaylight.controller.cluster.datastore.config.PrefixShardConfiguration;
import org.opendaylight.controller.cluster.datastore.AbstractDataStore;
import org.opendaylight.controller.cluster.datastore.ClusterWrapper;
import org.opendaylight.controller.cluster.datastore.config.PrefixShardConfiguration;
-import org.opendaylight.controller.cluster.datastore.utils.Actor
Context
;
+import org.opendaylight.controller.cluster.datastore.utils.Actor
Utils
;
import org.opendaylight.controller.cluster.datastore.utils.ClusterUtils;
import org.opendaylight.controller.cluster.raft.client.messages.FindLeader;
import org.opendaylight.controller.cluster.raft.client.messages.FindLeaderReply;
import org.opendaylight.controller.cluster.datastore.utils.ClusterUtils;
import org.opendaylight.controller.cluster.raft.client.messages.FindLeader;
import org.opendaylight.controller.cluster.raft.client.messages.FindLeaderReply;
@@
-88,7
+88,7
@@
public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
private final ClusterWrapper clusterWrapper;
// helper actorContext used only for static calls to executeAsync etc
// for calls that need specific actor context tied to a datastore use the one provided in the DistributedDataStore
private final ClusterWrapper clusterWrapper;
// helper actorContext used only for static calls to executeAsync etc
// for calls that need specific actor context tied to a datastore use the one provided in the DistributedDataStore
- private final Actor
Context actorContext
;
+ private final Actor
Utils actorUtils
;
private final ShardingServiceAddressResolver resolver;
private final AbstractDataStore distributedConfigDatastore;
private final AbstractDataStore distributedOperDatastore;
private final ShardingServiceAddressResolver resolver;
private final AbstractDataStore distributedConfigDatastore;
private final AbstractDataStore distributedOperDatastore;
@@
-105,7
+105,7
@@
public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
distributedConfigDatastore = builder.getDistributedConfigDatastore();
distributedOperDatastore = builder.getDistributedOperDatastore();
lookupTaskMaxRetries = builder.getLookupTaskMaxRetries();
distributedConfigDatastore = builder.getDistributedConfigDatastore();
distributedOperDatastore = builder.getDistributedOperDatastore();
lookupTaskMaxRetries = builder.getLookupTaskMaxRetries();
- actor
Context = distributedConfigDatastore.getActorContext
();
+ actor
Utils = distributedConfigDatastore.getActorUtils
();
resolver = new ShardingServiceAddressResolver(
DistributedShardedDOMDataTree.ACTOR_ID, clusterWrapper.getCurrentMemberName());
resolver = new ShardingServiceAddressResolver(
DistributedShardedDOMDataTree.ACTOR_ID, clusterWrapper.getCurrentMemberName());
@@
-229,7
+229,7
@@
public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
final ActorSelection actorSelection = actorSystem.actorSelection(address);
futures.add(
FutureConverters.toJava(
final ActorSelection actorSelection = actorSystem.actorSelection(address);
futures.add(
FutureConverters.toJava(
- actor
Context
.executeOperationAsync(
+ actor
Utils
.executeOperationAsync(
actorSelection, new NotifyProducerCreated(subtrees), DEFAULT_ASK_TIMEOUT))
.toCompletableFuture());
}
actorSelection, new NotifyProducerCreated(subtrees), DEFAULT_ASK_TIMEOUT))
.toCompletableFuture());
}
@@
-269,7
+269,7
@@
public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
final ActorSelection selection = actorSystem.actorSelection(address);
futures.add(FutureConverters.toJava(
final ActorSelection selection = actorSystem.actorSelection(address);
futures.add(FutureConverters.toJava(
- actor
Context
.executeOperationAsync(selection, new NotifyProducerRemoved(message.getSubtrees())))
+ actor
Utils
.executeOperationAsync(selection, new NotifyProducerRemoved(message.getSubtrees())))
.toCompletableFuture());
}
.toCompletableFuture());
}
@@
-312,8
+312,8
@@
public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
final DOMDataTreeIdentifier prefix = message.getPrefix();
final DOMDataTreeIdentifier prefix = message.getPrefix();
- final Actor
Context
context = prefix.getDatastoreType() == LogicalDatastoreType.CONFIGURATION
- ? distributedConfigDatastore.getActor
Context() : distributedOperDatastore.getActorContext
();
+ final Actor
Utils
context = prefix.getDatastoreType() == LogicalDatastoreType.CONFIGURATION
+ ? distributedConfigDatastore.getActor
Utils() : distributedOperDatastore.getActorUtils
();
// schedule a notification task for the reply
actorSystem.scheduler().scheduleOnce(SHARD_LOOKUP_TASK_INTERVAL,
// schedule a notification task for the reply
actorSystem.scheduler().scheduleOnce(SHARD_LOOKUP_TASK_INTERVAL,
@@
-334,7
+334,7
@@
public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
final ShardRemovalLookupTask removalTask =
new ShardRemovalLookupTask(actorSystem, getSender(),
final ShardRemovalLookupTask removalTask =
new ShardRemovalLookupTask(actorSystem, getSender(),
- actor
Context
, message.getPrefix(), lookupTaskMaxRetries);
+ actor
Utils
, message.getPrefix(), lookupTaskMaxRetries);
actorSystem.scheduler().scheduleOnce(SHARD_LOOKUP_TASK_INTERVAL, removalTask, actorSystem.dispatcher());
}
actorSystem.scheduler().scheduleOnce(SHARD_LOOKUP_TASK_INTERVAL, removalTask, actorSystem.dispatcher());
}
@@
-348,9
+348,9
@@
public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
private void onStartConfigShardLookup(final StartConfigShardLookup message) {
LOG.debug("Received StartConfigShardLookup: {}", message);
private void onStartConfigShardLookup(final StartConfigShardLookup message) {
LOG.debug("Received StartConfigShardLookup: {}", message);
- final Actor
Context
context =
+ final Actor
Utils
context =
message.getType().equals(LogicalDatastoreType.CONFIGURATION)
message.getType().equals(LogicalDatastoreType.CONFIGURATION)
- ? distributedConfigDatastore.getActor
Context() : distributedOperDatastore.getActorContext
();
+ ? distributedConfigDatastore.getActor
Utils() : distributedOperDatastore.getActorUtils
();
// schedule a notification task for the reply
actorSystem.scheduler().scheduleOnce(SHARD_LOOKUP_TASK_INTERVAL,
// schedule a notification task for the reply
actorSystem.scheduler().scheduleOnce(SHARD_LOOKUP_TASK_INTERVAL,
@@
-408,7
+408,7
@@
public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
private final ActorSystem system;
private final ActorRef replyTo;
private final ClusterWrapper clusterWrapper;
private final ActorSystem system;
private final ActorRef replyTo;
private final ClusterWrapper clusterWrapper;
- private final Actor
Context
context;
+ private final Actor
Utils
context;
private final DistributedShardedDOMDataTree shardingService;
private final DOMDataTreeIdentifier toLookup;
private final int lookupMaxRetries;
private final DistributedShardedDOMDataTree shardingService;
private final DOMDataTreeIdentifier toLookup;
private final int lookupMaxRetries;
@@
-416,7
+416,7
@@
public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
ShardCreationLookupTask(final ActorSystem system,
final ActorRef replyTo,
final ClusterWrapper clusterWrapper,
ShardCreationLookupTask(final ActorSystem system,
final ActorRef replyTo,
final ClusterWrapper clusterWrapper,
- final Actor
Context
context,
+ final Actor
Utils
context,
final DistributedShardedDOMDataTree shardingService,
final DOMDataTreeIdentifier toLookup,
final int lookupMaxRetries) {
final DistributedShardedDOMDataTree shardingService,
final DOMDataTreeIdentifier toLookup,
final int lookupMaxRetries) {
@@
-468,7
+468,7
@@
public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
private final ActorSystem system;
private final ActorRef replyTo;
private final ActorSystem system;
private final ActorRef replyTo;
- private final Actor
Context
context;
+ private final Actor
Utils
context;
private final ClusterWrapper clusterWrapper;
private final ActorRef shard;
private final DistributedShardedDOMDataTree shardingService;
private final ClusterWrapper clusterWrapper;
private final ActorRef shard;
private final DistributedShardedDOMDataTree shardingService;
@@
-477,7
+477,7
@@
public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
ShardLeaderLookupTask(final ActorSystem system,
final ActorRef replyTo,
ShardLeaderLookupTask(final ActorSystem system,
final ActorRef replyTo,
- final Actor
Context
context,
+ final Actor
Utils
context,
final ClusterWrapper clusterWrapper,
final ActorRef shard,
final DistributedShardedDOMDataTree shardingService,
final ClusterWrapper clusterWrapper,
final ActorRef shard,
final DistributedShardedDOMDataTree shardingService,
@@
-603,12
+603,12
@@
public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
private final ActorSystem system;
private final ActorRef replyTo;
private final ActorSystem system;
private final ActorRef replyTo;
- private final Actor
Context
context;
+ private final Actor
Utils
context;
private final DOMDataTreeIdentifier toLookup;
ShardRemovalLookupTask(final ActorSystem system,
final ActorRef replyTo,
private final DOMDataTreeIdentifier toLookup;
ShardRemovalLookupTask(final ActorSystem system,
final ActorRef replyTo,
- final Actor
Context
context,
+ final Actor
Utils
context,
final DOMDataTreeIdentifier toLookup,
final int lookupMaxRetries) {
super(replyTo, lookupMaxRetries);
final DOMDataTreeIdentifier toLookup,
final int lookupMaxRetries) {
super(replyTo, lookupMaxRetries);
@@
-654,11
+654,11
@@
public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
private final ActorSystem system;
private final ActorRef replyTo;
private final ActorSystem system;
private final ActorRef replyTo;
- private final Actor
Context
context;
+ private final Actor
Utils
context;
ConfigShardLookupTask(final ActorSystem system,
final ActorRef replyTo,
ConfigShardLookupTask(final ActorSystem system,
final ActorRef replyTo,
- final Actor
Context
context,
+ final Actor
Utils
context,
final StartConfigShardLookup message,
final int lookupMaxRetries) {
super(replyTo, lookupMaxRetries);
final StartConfigShardLookup message,
final int lookupMaxRetries) {
super(replyTo, lookupMaxRetries);
@@
-695,13
+695,13
@@
public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
private final ActorSystem system;
private final ActorRef replyTo;
private final ActorSystem system;
private final ActorRef replyTo;
- private final Actor
Context
context;
+ private final Actor
Utils
context;
private final ClusterWrapper clusterWrapper;
private final ActorRef shard;
ConfigShardReadinessTask(final ActorSystem system,
final ActorRef replyTo,
private final ClusterWrapper clusterWrapper;
private final ActorRef shard;
ConfigShardReadinessTask(final ActorSystem system,
final ActorRef replyTo,
- final Actor
Context
context,
+ final Actor
Utils
context,
final ClusterWrapper clusterWrapper,
final ActorRef shard,
final int lookupMaxRetries) {
final ClusterWrapper clusterWrapper,
final ActorRef shard,
final int lookupMaxRetries) {