Examples of Bet


Examples of com.typesafe.akkademo.common.Bet

        if (idempotentId % (randomizer.nextInt(10) + 10) == 0) throw new RuntimeException("Hey, I did not count on this happening...");
        if (idempotentId % (randomizer.nextInt(17) + 17) == 0) throw new DatabaseFailureException("Help! The database's gone haywire.");
        if (idempotentId % (randomizer.nextInt(121) + 50) == 0) System.exit(1);

        if (!bets.containsKey(idempotentId)) {
            persist(idempotentId, new Bet(player, game, amount));
        }
    }
View Full Code Here

Examples of com.typesafe.akkademo.common.Bet

        return new ArrayList<Bet>(bets.values());
    }

    private PlayerBet deserialize(String line) {
        ImmutableList<String> pieces = ImmutableList.copyOf(splitter.split(line));
        return new PlayerBet(Integer.valueOf(pieces.get(0)), new Bet(pieces.get(1), Integer.valueOf(pieces.get(2)), Integer.valueOf(pieces.get(3))));
    }
View Full Code Here

Examples of com.typesafe.akkademo.common.Bet

    }

    private void sendMessages(ActorSystem system) {
        ActorRef service = getService(system);
        for (int i = 0; i < 200; i++) {
            service.tell(new Bet("ready_player_one", i % 10 + 1, i % 100 + 1));
        }
        System.out.println("*** SENDING OK");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.