Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
joram
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
joram
joram
Commits
ae4311c1
Commit
ae4311c1
authored
Jan 12, 2021
by
Andre Freyssinet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JORAM-377: Adds a task restarting the daemon if there is no message
during a period.
parent
fad5af6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
20 deletions
+6
-20
joram/joram/mom/extensions/restbridge/src/main/java/com/scalagent/joram/mom/dest/rest/RestAcquisitionAsync.java
...m/scalagent/joram/mom/dest/rest/RestAcquisitionAsync.java
+6
-20
No files found.
joram/joram/mom/extensions/restbridge/src/main/java/com/scalagent/joram/mom/dest/rest/RestAcquisitionAsync.java
View file @
ae4311c1
...
...
@@ -887,32 +887,14 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
}
private
long
round
=
0
;
public
long
getRound
()
{
return
round
;
}
private
long
lastActivity
=
0
;
public
long
getLastActivity
()
{
return
lastActivity
;
}
private
long
lastMessage
=
0
;
public
long
getLastMessage
()
{
return
lastMessage
;
}
private
int
nbCnx
=
0
;
public
boolean
isConnected
()
{
return
uriCloseConsumer
!=
null
;
}
private
int
nbCnx
=
0
;
public
int
getNbCnx
()
{
return
nbCnx
;
}
/**
* Task checking the acquisition mechanism. If no message has been received during this
* period, the daemon is restarted.
...
...
@@ -924,6 +906,10 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
public
void
run
()
{
if
(
checkTask
==
null
)
return
;
if
(
logger
.
isLoggable
(
BasicLevel
.
INFO
))
logger
.
log
(
BasicLevel
.
INFO
,
"RestAcquisitionAsync.CheckTask.run(): cnx="
+
nbCnx
+
", msg="
+
lastMessage
+
" ("
+
round
+
'/'
+
lastActivity
+
')'
);
// TODO (AF): The check is currently done on the number of messages acquired. This involves
// restarting the daemon when there is no message for a period. There are other indicators,
// but the number of messages acquired is the most reliable.
...
...
@@ -932,7 +918,7 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
return
;
}
logger
.
log
(
BasicLevel
.
INFO
,
"RestAcquisitionAsync.CheckTask.run(): restart daemon."
);
logger
.
log
(
BasicLevel
.
WARN
,
"RestAcquisitionAsync.CheckTask.run(): restart daemon."
);
restart
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment