Skip to content
Snippets Groups Projects

Configuration system

Merged davbohn requested to merge dev-group3 into master
38 files
+ 1050
233
Compare changes
  • Side-by-side
  • Inline
Files
38
 
package fucoin.actions.control;
 
 
import akka.actor.ActorRef;
 
import akka.actor.UntypedActorContext;
 
import fucoin.actions.transaction.SuperVisorAction;
 
import fucoin.supervisor.SuperVisorImpl;
 
 
/**
 
* Announce, that there will be some wallets spawned.
 
* Used by the configurator to wait, until all new wallets have their initial money.
 
* Send to supervisor.
 
*/
 
public class ActionAnnounceWalletCreation extends SuperVisorAction {
 
 
public int numOfWallets;
 
public ActorRef observer;
 
 
public ActionAnnounceWalletCreation(int numOfWallets, ActorRef observer) {
 
 
this.numOfWallets = numOfWallets;
 
this.observer = observer;
 
}
 
 
@Override
 
protected void onAction(ActorRef sender, ActorRef self, UntypedActorContext context, SuperVisorImpl abstractNode) {
 
System.out.println("Waiting for wallet transactions");
 
abstractNode.setPendingBankCommits(abstractNode.getPendingBankCommits() + numOfWallets);
 
abstractNode.setBankCommitObserver(sender);
 
}
 
}
Loading