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
9953bacf
Commit
9953bacf
authored
9 years ago
by
rimesime
Browse files
Options
Downloads
Patches
Plain Diff
fixing some things
parent
c4478ffd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Interface/AbstractWallet.java
+22
-7
22 additions, 7 deletions
Interface/AbstractWallet.java
with
22 additions
and
7 deletions
Interface/AbstractWallet.java
+
22
−
7
View file @
9953bacf
...
@@ -5,9 +5,11 @@ import java.io.Serializable;
...
@@ -5,9 +5,11 @@ import java.io.Serializable;
public
abstract
class
AbstractWallet
extends
UntypedActor
implements
Serializable
{
public
abstract
class
AbstractWallet
extends
UntypedActor
implements
Serializable
{
// Returns some neighbors that might be used as local
// Used to join the network (a pre known participant/Wallet must be known)
// and/or local neighborsUntypedActor
public
static
class
ActionJoin
implements
Serializable
{}
public
static
class
ActionJoin
implements
Serializable
{}
// Returns some neighbors that might be used as known
// and/or local neighbors
public
class
ActionJoinAnswer
implements
Serializable
{
public
class
ActionJoinAnswer
implements
Serializable
{
public
final
HashMap
<
String
,
ActorRef
>
someNeighbors
=
new
HashMap
<>();
public
final
HashMap
<
String
,
ActorRef
>
someNeighbors
=
new
HashMap
<>();
}
}
...
@@ -45,16 +47,21 @@ public abstract class AbstractWallet extends UntypedActor implements Serializabl
...
@@ -45,16 +47,21 @@ public abstract class AbstractWallet extends UntypedActor implements Serializabl
}
}
}
}
// Used to return a Wallet
// Used to return a Wallet reference (akka-style string which can
// be transformed to an ActorRef)
public
static
class
ActionSearchWalletReferenceAnswer
implements
Serializable
{
public
static
class
ActionSearchWalletReferenceAnswer
implements
Serializable
{
final
AbstractWallet
w
;
final
String
address
;
public
ActionSearchWalletReferenceAnswer
(
AbstractWallet
w
)
{
public
ActionSearchWalletReferenceAnswer
(
String
address
)
{
this
.
w
=
w
;
this
.
address
=
address
;
}
}
}
}
// Used to search a Wallet by name, i.e. the own wallet if we just
// Used to search a Wallet by name, i.e. the own wallet if we just
// joined the network
// joined the network; If a receiving participant holds the stored Wallet,
// he returns it, otherwise, he might use gossiping methods to go on
// with the search;
// Note: You should also forward the sender (the participant who actually
// searches for this Wallet, so that it can be returnd the direct way)
public
static
class
ActionSearchMyWallet
implements
Serializable
{
public
static
class
ActionSearchMyWallet
implements
Serializable
{
final
String
name
;
final
String
name
;
public
ActionSearchMyWallet
(
String
name
)
{
public
ActionSearchMyWallet
(
String
name
)
{
...
@@ -62,6 +69,14 @@ public abstract class AbstractWallet extends UntypedActor implements Serializabl
...
@@ -62,6 +69,14 @@ public abstract class AbstractWallet extends UntypedActor implements Serializabl
}
}
}
}
// Used to return a searched Wallet
public
static
class
ActionSearchMyWalletAnswer
implements
Serializable
{
final
AbstractWallet
w
;
public
ActionSearchMyWalletAnswer
(
AbstractWallet
w
)
{
this
.
w
=
w
;
}
}
// Constructor
// Constructor
public
AbstractWallet
(
String
name
)
{
public
AbstractWallet
(
String
name
)
{
this
.
name
=
name
;
this
.
name
=
name
;
...
...
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