Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FUCoin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DistributedSystems4Students
FUCoin
Commits
6194941b
Commit
6194941b
authored
8 years ago
by
Kim Kern
Browse files
Options
Downloads
Patches
Plain Diff
make AggregationContext nonnull
parent
d8ea09da
Branches
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
src/main/java/fucoin/actions/aggregation/ActionAggregationCancel.java
+6
-2
6 additions, 2 deletions
...a/fucoin/actions/aggregation/ActionAggregationCancel.java
src/main/java/fucoin/wallet/WalletImpl.java
+2
-1
2 additions, 1 deletion
src/main/java/fucoin/wallet/WalletImpl.java
with
8 additions
and
3 deletions
src/main/java/fucoin/actions/aggregation/ActionAggregationCancel.java
+
6
−
2
View file @
6194941b
...
@@ -32,10 +32,14 @@ public class ActionAggregationCancel extends ActionAggregation {
...
@@ -32,10 +32,14 @@ public class ActionAggregationCancel extends ActionAggregation {
if
(
isDone
())
{
if
(
isDone
())
{
wallet
.
addExcludedNeighbor
(
sender
);
wallet
.
addExcludedNeighbor
(
sender
);
}
}
if
(!
wallet
.
areAllNeighborsExcluded
())
{
AggregationContext
aggregationContext
=
wallet
.
getAggregationContext
();
if
(!
wallet
.
areAllNeighborsExcluded
()
&&
!
aggregationContext
.
isDone
())
{
continueAggregation
(
wallet
);
continueAggregation
(
wallet
);
}
else
if
(
aggregationContext
.
isDone
()
&&
!
wallet
.
areAllNeighborsExcluded
())
{
sendEndMessage
(
wallet
);
}
else
if
(
wallet
.
hasAggregationContext
())
{
}
else
if
(
wallet
.
hasAggregationContext
())
{
sendAggregatedResult
(
wallet
,
wallet
.
getA
ggregationContext
()
);
sendAggregatedResult
(
wallet
,
a
ggregationContext
);
sendEndMessage
(
wallet
);
sendEndMessage
(
wallet
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/fucoin/wallet/WalletImpl.java
+
2
−
1
View file @
6194941b
...
@@ -11,6 +11,7 @@ import akka.actor.ActorRef;
...
@@ -11,6 +11,7 @@ import akka.actor.ActorRef;
import
akka.actor.Props
;
import
akka.actor.Props
;
import
fucoin.actions.ClientAction
;
import
fucoin.actions.ClientAction
;
import
fucoin.actions.aggregation.AggregationContext
;
import
fucoin.actions.aggregation.AggregationContext
;
import
fucoin.actions.aggregation.AggregationContext.AggregationContextBuilder
;
import
fucoin.actions.join.ActionJoin
;
import
fucoin.actions.join.ActionJoin
;
import
fucoin.actions.join.ActionJoinAnswer
;
import
fucoin.actions.join.ActionJoinAnswer
;
import
fucoin.actions.join.ActionTellSupervisor
;
import
fucoin.actions.join.ActionTellSupervisor
;
...
@@ -29,7 +30,7 @@ public class WalletImpl extends AbstractWallet {
...
@@ -29,7 +30,7 @@ public class WalletImpl extends AbstractWallet {
private
transient
WalletGuiControl
gui
;
private
transient
WalletGuiControl
gui
;
private
String
preKnownNeighbourName
;
private
String
preKnownNeighbourName
;
private
boolean
isActive
;
private
boolean
isActive
;
private
AggregationContext
aggregationContext
;
private
AggregationContext
aggregationContext
=
new
AggregationContextBuilder
(
null
,
null
,
amount
).
build
()
;
private
boolean
hasPendingAggregationRequest
=
false
;
private
boolean
hasPendingAggregationRequest
=
false
;
private
ConcurrentLinkedQueue
<
ActorRef
>
deferedSupervisorReceivers
=
new
ConcurrentLinkedQueue
<>();
private
ConcurrentLinkedQueue
<
ActorRef
>
deferedSupervisorReceivers
=
new
ConcurrentLinkedQueue
<>();
private
transient
final
EvictingQueue
<
UUID
>
handledAggregationRequests
=
EvictingQueue
.
create
(
10
);
private
transient
final
EvictingQueue
<
UUID
>
handledAggregationRequests
=
EvictingQueue
.
create
(
10
);
...
...
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