|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjimm.evote.ElectionDay
Simulates election day voting. The method simulateVoting(jimm.evote.VoteServer)
creates a
bunch of voting Booth
s, has them generate votes, and sends all of
the booths' votes to a VoteServer
.
Field Summary | |
protected int |
boothAddress
|
protected java.util.Random |
rand
|
Constructor Summary | |
(package private) |
ElectionDay()
|
Method Summary | |
protected byte[] |
asQuadByteArray(int address)
Returns an int as a quad byte array. |
protected Booth |
createBooth()
Creates and returns a voting booth. |
static void |
main(java.lang.String[] args)
Simulates election day voting. |
protected void |
sendVotesToServer(java.util.List booths,
VoteServer server)
Sends votes to a vote server using multiple threads so the server gets concurrent updates. |
void |
simulateVoting(VoteServer server)
Simulates election day voting. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Random rand
protected int boothAddress
Constructor Detail |
ElectionDay()
Method Detail |
public void simulateVoting(VoteServer server)
server
- a vote serverprotected Booth createBooth()
protected byte[] asQuadByteArray(int address)
protected void sendVotesToServer(java.util.List booths, VoteServer server)
public static void main(java.lang.String[] args)
usage: ElectionDay /path/to/database/directory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |