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 checkstyle warnings in netty-threadgroup-config.
[controller.git]
/
opendaylight
/
md-sal
/
sal-akka-raft
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
raft
/
RaftActorContextImpl.java
diff --git
a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorContextImpl.java
b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorContextImpl.java
index 833c8a9e8ad1ca7b8fe170aadffc25b3c12b6b24..e4aef0a8445d2400e54fff5c1d09c9044747134f 100644
(file)
--- a/
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorContextImpl.java
+++ b/
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorContextImpl.java
@@
-19,7
+19,7
@@
import java.util.Map;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.base.Preconditions.checkState;
-public class RaftActorContextImpl implements RaftActorContext{
+public class RaftActorContextImpl implements RaftActorContext
{
private final ActorRef actor;
private final ActorRef actor;
@@
-33,16
+33,20
@@
public class RaftActorContextImpl implements RaftActorContext{
private long lastApplied;
private long lastApplied;
- private
final
ReplicatedLog replicatedLog;
+ private ReplicatedLog replicatedLog;
private final Map<String, String> peerAddresses;
private final LoggingAdapter LOG;
private final Map<String, String> peerAddresses;
private final LoggingAdapter LOG;
+ private final ConfigParams configParams;
+
public RaftActorContextImpl(ActorRef actor, UntypedActorContext context,
String id,
ElectionTerm termInformation, long commitIndex,
public RaftActorContextImpl(ActorRef actor, UntypedActorContext context,
String id,
ElectionTerm termInformation, long commitIndex,
- long lastApplied, ReplicatedLog replicatedLog, Map<String, String> peerAddresses, LoggingAdapter logger) {
+ long lastApplied, ReplicatedLog replicatedLog,
+ Map<String, String> peerAddresses, ConfigParams configParams,
+ LoggingAdapter logger) {
this.actor = actor;
this.context = context;
this.id = id;
this.actor = actor;
this.context = context;
this.id = id;
@@
-51,29
+55,36
@@
public class RaftActorContextImpl implements RaftActorContext{
this.lastApplied = lastApplied;
this.replicatedLog = replicatedLog;
this.peerAddresses = peerAddresses;
this.lastApplied = lastApplied;
this.replicatedLog = replicatedLog;
this.peerAddresses = peerAddresses;
+ this.configParams = configParams;
this.LOG = logger;
}
this.LOG = logger;
}
+ @Override
public ActorRef actorOf(Props props){
return context.actorOf(props);
}
public ActorRef actorOf(Props props){
return context.actorOf(props);
}
+ @Override
public ActorSelection actorSelection(String path){
return context.actorSelection(path);
}
public ActorSelection actorSelection(String path){
return context.actorSelection(path);
}
+ @Override
public String getId() {
return id;
}
public String getId() {
return id;
}
+ @Override
public ActorRef getActor() {
return actor;
}
public ActorRef getActor() {
return actor;
}
+ @Override
public ElectionTerm getTermInformation() {
return termInformation;
}
public ElectionTerm getTermInformation() {
return termInformation;
}
+ @Override
public long getCommitIndex() {
return commitIndex;
}
public long getCommitIndex() {
return commitIndex;
}
@@
-82,6
+93,7
@@
public class RaftActorContextImpl implements RaftActorContext{
this.commitIndex = commitIndex;
}
this.commitIndex = commitIndex;
}
+ @Override
public long getLastApplied() {
return lastApplied;
}
public long getLastApplied() {
return lastApplied;
}
@@
-90,6
+102,10
@@
public class RaftActorContextImpl implements RaftActorContext{
this.lastApplied = lastApplied;
}
this.lastApplied = lastApplied;
}
+ @Override public void setReplicatedLog(ReplicatedLog replicatedLog) {
+ this.replicatedLog = replicatedLog;
+ }
+
@Override public ReplicatedLog getReplicatedLog() {
return replicatedLog;
}
@Override public ReplicatedLog getReplicatedLog() {
return replicatedLog;
}
@@
-110,6
+126,10
@@
public class RaftActorContextImpl implements RaftActorContext{
return peerAddresses.get(peerId);
}
return peerAddresses.get(peerId);
}
+ @Override public ConfigParams getConfigParams() {
+ return configParams;
+ }
+
@Override public void addToPeers(String name, String address) {
peerAddresses.put(name, address);
}
@Override public void addToPeers(String name, String address) {
peerAddresses.put(name, address);
}