Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Fog Computing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Niklas Teschner
Fog Computing
Commits
176e8b79
Commit
176e8b79
authored
9 months ago
by
Jonas Arnhold
Browse files
Options
Downloads
Patches
Plain Diff
use !Thread.currentThread().isInterrupted()
parent
60651354
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
edge/src/main/java/com/fogcomputing/MessageSender.java
+1
-1
1 addition, 1 deletion
edge/src/main/java/com/fogcomputing/MessageSender.java
edge/src/main/java/com/fogcomputing/SensorDataCollector.java
+1
-1
1 addition, 1 deletion
edge/src/main/java/com/fogcomputing/SensorDataCollector.java
with
2 additions
and
2 deletions
edge/src/main/java/com/fogcomputing/MessageSender.java
+
1
−
1
View file @
176e8b79
...
...
@@ -26,7 +26,7 @@ public class MessageSender implements Runnable {
@Override
public
void
run
()
{
while
(
true
)
{
while
(
!
Thread
.
currentThread
().
isInterrupted
()
)
{
if
(!
deadLetterBuffer
.
isEmpty
())
{
deadLetterBuffer
.
stream
().
filter
(
this
::
trySendToCloud
).
forEach
(
deadLetterBuffer:
:
remove
);
...
...
This diff is collapsed.
Click to expand it.
edge/src/main/java/com/fogcomputing/SensorDataCollector.java
+
1
−
1
View file @
176e8b79
...
...
@@ -29,7 +29,7 @@ public class SensorDataCollector implements Runnable {
temperatureSub
.
connect
(
"tcp://*:%s"
.
formatted
(
TEMPERATURE_TOPIC_PORT
));
temperatureSub
.
subscribe
(
TEMPERATURE_TOPIC
.
getBytes
());
while
(
true
)
{
while
(
!
Thread
.
currentThread
().
isInterrupted
()
)
{
String
usageData
=
usageSub
.
recvStr
().
substring
(
USAGE_TOPIC
.
length
()
+
1
);
String
temperatureData
=
temperatureSub
.
recvStr
().
substring
(
TEMPERATURE_TOPIC
.
length
()
+
1
);
messagebuffer
.
offer
(
new
SensorData
(
usageData
,
temperatureData
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment