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
f317420a
Commit
f317420a
authored
8 years ago
by
Simon Könnecke
Browse files
Options
Downloads
Patches
Plain Diff
snapshot trigger on wallet gui will be create as wall a supervisor snapshot
parent
5a00d926
Branches
dev-group3-qdigest
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/control/ActionSuperVisorCreateSnapshot.java
+6
-5
6 additions, 5 deletions
...ucoin/actions/control/ActionSuperVisorCreateSnapshot.java
src/main/java/fucoin/wallet/WalletImpl.java
+3
-0
3 additions, 0 deletions
src/main/java/fucoin/wallet/WalletImpl.java
with
9 additions
and
5 deletions
src/main/java/fucoin/actions/control/ActionSuperVisorCreateSnapshot.java
+
6
−
5
View file @
f317420a
...
...
@@ -19,16 +19,17 @@ public class ActionSuperVisorCreateSnapshot extends SuperVisorAction {
@Override
protected
void
onAction
(
ActorRef
sender
,
ActorRef
self
,
UntypedActorContext
context
,
SuperVisorImpl
abstractNode
)
{
//
//write the snapshot
//
if (!abstractNode.writeSnapshot(time)) {
//
//snapshot already exists
//
return;
//
}
//write the snapshot
if
(!
abstractNode
.
writeSnapshot
(
time
))
{
//snapshot already exists
return
;
}
//
// //notify one in the network
// for(ActorRef startPoint: abstractNode.getKnownNeighbors().values()) {
// startPoint.tell(new ActionWalletCreateSnapshot(time), self);
// break;
// }
}
}
This diff is collapsed.
Click to expand it.
src/main/java/fucoin/wallet/WalletImpl.java
+
3
−
0
View file @
f317420a
...
...
@@ -2,6 +2,7 @@ package fucoin.wallet;
import
akka.actor.*
;
import
fucoin.actions.ClientAction
;
import
fucoin.actions.control.ActionSuperVisorCreateSnapshot
;
import
fucoin.actions.control.ActionWalletCreateSnapshot
;
import
fucoin.actions.join.ActionJoin
;
import
fucoin.actions.join.ActionTellSupervisor
;
...
...
@@ -307,6 +308,8 @@ public class WalletImpl extends AbstractWallet {
enableMessageForwarding
(
token
,
self
());
getRemoteSuperVisorActor
().
tell
(
new
ActionSuperVisorCreateSnapshot
(
token
),
self
());
getKnownNeighbors
().
values
().
forEach
(
actorRef
->
{
actorRef
.
tell
(
new
ActionWalletCreateSnapshot
(
token
,
self
()),
self
());
});
...
...
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