Skip to content
Snippets Groups Projects
Unverified Commit 8da179f4 authored by David Bohn's avatar David Bohn
Browse files

Some minor changes to make the IDE happy

parent ce4bc8bb
No related branches found
No related tags found
1 merge request!5Configuration system
......@@ -23,11 +23,11 @@ import java.util.concurrent.ThreadLocalRandom;
*/
public abstract class AbstractConfiguration extends AbstractNode {
protected ActorRef superVisor;
private ActorRef superVisor;
protected final List<ActorRef> activeActors = new ArrayList<>();
private final List<ActorRef> activeActors = new ArrayList<>();
protected Timeout timeout = new Timeout(Duration.create(10, "seconds"));
private Timeout timeout = new Timeout(Duration.create(10, "seconds"));
public static Props props(Class configurationClass) {
......@@ -38,7 +38,7 @@ public abstract class AbstractConfiguration extends AbstractNode {
* Spawns a new wallet and blocks until it has received its initial money
* @throws Exception on timeout
*/
public ActorRef spawnWallet(String name, boolean createGUI) throws Exception {
ActorRef spawnWallet(String name, boolean createGUI) throws Exception {
Future<Object> future = Patterns.ask(superVisor, new ActionAnnounceWalletCreation(1, self()), timeout);
ActorRef wallet = createWallet(name, createGUI);
Await.result(future, timeout.duration());
......@@ -48,7 +48,7 @@ public abstract class AbstractConfiguration extends AbstractNode {
/**
* Creates a wallet without blocking until the wallet was created
*/
public ActorRef createWallet(String name, boolean createGUI) {
private ActorRef createWallet(String name, boolean createGUI) {
Props props;
int numOfWallets = activeActors.size();
if (numOfWallets == 0) {
......@@ -83,7 +83,6 @@ public abstract class AbstractConfiguration extends AbstractNode {
/**
* Fetch a random wallet
* @return
*/
public ActorRef getRandomWallet() {
return activeActors.get(ThreadLocalRandom.current().nextInt(activeActors.size()));
......@@ -95,9 +94,8 @@ public abstract class AbstractConfiguration extends AbstractNode {
/**
* Create the supervisor node
* @return
*/
public ActorRef initSupervisor() {
ActorRef initSupervisor() {
superVisor = context().actorOf(SuperVisorImpl.props(), "SuperVisorImpl");
// Don't ask.
......
package fucoin.configurations;
import akka.actor.ActorRef;
import fucoin.actions.Action;
import fucoin.actions.control.ActionWalletSendMoney;
import fucoin.actions.transaction.ActionNotifyObserver;
import fucoin.configurations.internal.ConfigurationName;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment