|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimulator_lib.SimulatorUtils
public class SimulatorUtils
The SimulatorUtils class assists the TraceSimulator driver. Its work most pertains to the queuing and commitment of transactions (actually transferring files and deciding feedbacks).
Constructor Summary | |
---|---|
SimulatorUtils()
|
Method Summary | |
---|---|
private void |
commitFBack(Network nw,
Transaction trans)
Commit feedback upon transaction completion. |
private void |
commitFile(Network nw,
Transaction trans)
Transfer a file between two users. |
void |
commitRemaining(Network nw,
int cycle,
TrustAlg ALG)
Commit all remaining transactions in a Network delay queue. |
void |
simTrans(Network nw,
int cyc,
Transaction trans,
SimulatorMalicious mal,
TrustAlg ALG)
Simulate a transaction on a network. |
private Transaction |
transactionCommit(Network nw,
int cycle,
TrustAlg ALG)
If ready (complete), commit the Transaction atop the delay queue. |
private void |
transactionQueue(Network nw,
int cycle,
Transaction trans,
SimulatorMalicious mal,
TrustAlg ALG)
Begin a transaction between parties, queuing it for later commitment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimulatorUtils()
Method Detail |
---|
public void simTrans(Network nw, int cyc, Transaction trans, SimulatorMalicious mal, TrustAlg ALG)
nw
- Network in which the transaction should be simulatedcyc
- The current cycletrans
- The Transaction to be simulatedmal
- Object coordinating malicious user activityALG
- Trust algorithm instance managing Network 'nw'public void commitRemaining(Network nw, int cycle, TrustAlg ALG)
nw
- The Network with outstanding (queued) transactionscycle
- Cycle from which to begin commitmentsALG
- Trust algorithm instance managing Network 'nw'private Transaction transactionCommit(Network nw, int cycle, TrustAlg ALG)
nw
- Network whose queued Transaction will commit (if ready)cycle
- The current cycleALG
- Trust algorithm instance managing Network 'nw'
private void commitFile(Network nw, Transaction trans)
nw
- Network in which the transfer should take placetrans
- Transaction detailing parties/parameters of transferprivate void commitFBack(Network nw, Transaction trans)
nw
- Network in which feedback should be madetrans
- Transaction detailing parties/parameters of feedbackprivate void transactionQueue(Network nw, int cycle, Transaction trans, SimulatorMalicious mal, TrustAlg ALG)
nw
- Network in which the transaction will take placecycle
- The current cycletrans
- Transaction detailing parties/parameters of transactionmal
- Object coordinating malicious user activityALG
- Trust algorithm instance managing Network 'nw'
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |