Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Rename artifacts in A1 controller"
[nonrtric.git]
/
policy-agent
/
src
/
main
/
java
/
org
/
oransc
/
policyagent
/
repository
/
Service.java
diff --git
a/policy-agent/src/main/java/org/oransc/policyagent/repository/Service.java
b/policy-agent/src/main/java/org/oransc/policyagent/repository/Service.java
index
bcdc2ee
..
7b2c9bd
100644
(file)
--- a/
policy-agent/src/main/java/org/oransc/policyagent/repository/Service.java
+++ b/
policy-agent/src/main/java/org/oransc/policyagent/repository/Service.java
@@
-36,19
+36,19
@@
public class Service {
this.name = name;
this.keepAliveInterval = keepAliveInterval;
this.callbackUrl = callbackUrl;
this.name = name;
this.keepAliveInterval = keepAliveInterval;
this.callbackUrl = callbackUrl;
-
ping
();
+
keepAlive
();
}
public synchronized Duration getKeepAliveInterval() {
return this.keepAliveInterval;
}
}
public synchronized Duration getKeepAliveInterval() {
return this.keepAliveInterval;
}
- p
rivate synchronized void ping
() {
+ p
ublic synchronized void keepAlive
() {
this.lastPing = Instant.now();
}
public synchronized boolean isExpired() {
this.lastPing = Instant.now();
}
public synchronized boolean isExpired() {
- return timeSinceLastPing().compareTo(this.keepAliveInterval) > 0;
+ return t
his.keepAliveInterval.getSeconds() > 0 && t
imeSinceLastPing().compareTo(this.keepAliveInterval) > 0;
}
public synchronized Duration timeSinceLastPing() {
}
public synchronized Duration timeSinceLastPing() {