Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Cleanup ShardInformation
[controller.git]
/
opendaylight
/
md-sal
/
sal-distributed-datastore
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
datastore
/
shardmanager
/
ShardInformation.java
diff --git
a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardInformation.java
b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardInformation.java
index ea882dcbdf03ad3f26a3a90ab73f2d2d719e09af..cc3d5a90c4cdf028a2112c90fbeb9eae40a765d9 100644
(file)
--- a/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardInformation.java
+++ b/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardInformation.java
@@
-101,7
+101,7
@@
public final class ShardInformation {
}
void setLocalDataTree(final Optional<ReadOnlyDataTree> dataTree) {
}
void setLocalDataTree(final Optional<ReadOnlyDataTree> dataTree) {
-
this.
localShardDataTree = dataTree;
+ localShardDataTree = dataTree;
}
Optional<ReadOnlyDataTree> getLocalShardDataTree() {
}
Optional<ReadOnlyDataTree> getLocalShardDataTree() {
@@
-113,10
+113,10
@@
public final class ShardInformation {
}
void setDatastoreContext(final DatastoreContext newDatastoreContext, final ActorRef sender) {
}
void setDatastoreContext(final DatastoreContext newDatastoreContext, final ActorRef sender) {
-
this.
datastoreContext = newDatastoreContext;
+ datastoreContext = newDatastoreContext;
if (actor != null) {
LOG.debug("Sending new DatastoreContext to {}", shardId);
if (actor != null) {
LOG.debug("Sending new DatastoreContext to {}", shardId);
- actor.tell(
this.
datastoreContext, sender);
+ actor.tell(datastoreContext, sender);
}
}
}
}
@@
-152,17
+152,13
@@
public final class ShardInformation {
}
String getSerializedLeaderActor() {
}
String getSerializedLeaderActor() {
- if (isLeader()) {
- return Serialization.serializedActorPath(getActor());
- } else {
- return addressResolver.resolve(leaderId);
- }
+ return isLeader() ? Serialization.serializedActorPath(getActor()) : addressResolver.resolve(leaderId);
}
void setActorInitialized() {
LOG.debug("Shard {} is initialized", shardId);
}
void setActorInitialized() {
LOG.debug("Shard {} is initialized", shardId);
-
this.
actorInitialized = true;
+ actorInitialized = true;
notifyOnShardInitializedCallbacks();
}
notifyOnShardInitializedCallbacks();
}
@@
-197,7
+193,7
@@
public final class ShardInformation {
}
void setRole(final String newRole) {
}
void setRole(final String newRole) {
-
this.
role = newRole;
+ role = newRole;
notifyOnShardInitializedCallbacks();
}
notifyOnShardInitializedCallbacks();
}
@@
-207,13
+203,13
@@
public final class ShardInformation {
}
void setFollowerSyncStatus(final boolean syncStatus) {
}
void setFollowerSyncStatus(final boolean syncStatus) {
-
this.
followerSyncStatus = syncStatus;
+ followerSyncStatus = syncStatus;
}
boolean isInSync() {
}
boolean isInSync() {
- if (RaftState.Follower.name().equals(
this.
role)) {
+ if (RaftState.Follower.name().equals(role)) {
return followerSyncStatus;
return followerSyncStatus;
- } else if (RaftState.Leader.name().equals(
this.
role)) {
+ } else if (RaftState.Leader.name().equals(role)) {
return true;
}
return true;
}
@@
-221,10
+217,10
@@
public final class ShardInformation {
}
boolean setLeaderId(final String newLeaderId) {
}
boolean setLeaderId(final String newLeaderId) {
- final boolean changed = !Objects.equals(
this.
leaderId, newLeaderId);
-
this.
leaderId = newLeaderId;
+ final boolean changed = !Objects.equals(leaderId, newLeaderId);
+ leaderId = newLeaderId;
if (newLeaderId != null) {
if (newLeaderId != null) {
-
this.
leaderAvailable = true;
+ leaderAvailable = true;
}
notifyOnShardInitializedCallbacks();
}
notifyOnShardInitializedCallbacks();
@@
-256,7
+252,7
@@
public final class ShardInformation {
}
void setActiveMember(final boolean isActiveMember) {
}
void setActiveMember(final boolean isActiveMember) {
-
this.
activeMember = isActiveMember;
+ activeMember = isActiveMember;
}
EffectiveModelContext getSchemaContext() {
}
EffectiveModelContext getSchemaContext() {