|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
cz.zcu.fav.kiv.jsim.JSimProcess
vsp.Server
public class Server
Server class
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
private int |
counter
Transactions counter |
private double |
deviation
Deviation for Gaussian |
private double |
effectiveTime
Effective working time |
private boolean |
gauss
Is exp or Gauss? |
private double |
median
Median for Gaussian |
private QueueWithServer |
output1
Output queue 1 |
private QueueWithServer |
output2
Output queue 2 |
private double |
probability1
Probability for queue 1 |
private QueueWithServer |
queue
Assigned queue |
private static boolean |
SILENT
Silent mode for generating Gaussian |
private double |
transTq
Real Tq |
private double |
ts
Mean value |
Fields inherited from class cz.zcu.fav.kiv.jsim.JSimProcess |
---|
INT_REQUESTS_TO_IGNORE, myParent |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
Server(String name,
JSimSimulation simulation,
double median,
double deviation,
QueueWithServer queue,
QueueWithServer output1,
QueueWithServer output2,
double probability1)
Creates new server |
|
Server(String name,
JSimSimulation simulation,
double ts,
QueueWithServer queue,
QueueWithServer output1,
QueueWithServer output2,
double probability1)
Creates new server |
Method Summary | |
---|---|
int |
getCounter()
Get count of managed transactions |
double |
getLoad()
Server load |
double |
getTq()
Get average Tq for one request |
double |
getTransTq()
Get global Tq |
protected void |
life()
In infinite loop: - checks if queue is not empty - "work" - removes transaction from queue - decides to which output queue put transaction |
Methods inherited from class java.lang.Thread |
---|
activeCount, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, checkAccess, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, yield |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private double ts
private QueueWithServer queue
private int counter
private double transTq
private QueueWithServer output1
private QueueWithServer output2
private double probability1
private double effectiveTime
private double median
private double deviation
private static final boolean SILENT
private boolean gauss
Constructor Detail |
---|
public Server(String name, JSimSimulation simulation, double ts, QueueWithServer queue, QueueWithServer output1, QueueWithServer output2, double probability1) throws JSimSimulationAlreadyTerminatedException, JSimInvalidParametersException, JSimTooManyProcessesException
name
- server namesimulation
- simulation objectts
- mean service timequeue
- assigned queueoutput1
- output queue 1output2
- output queue 2probability1
- probability for queue 1
JSimSimulationAlreadyTerminatedException
JSimInvalidParametersException
JSimTooManyProcessesException
public Server(String name, JSimSimulation simulation, double median, double deviation, QueueWithServer queue, QueueWithServer output1, QueueWithServer output2, double probability1) throws JSimSimulationAlreadyTerminatedException, JSimInvalidParametersException, JSimTooManyProcessesException
name
- server namesimulation
- simulation objectmedian
- mediandeviation
- deviationqueue
- assigned queueoutput1
- output queue 1output2
- output queue 2probability1
- probability for queue 1
JSimSimulationAlreadyTerminatedException
JSimInvalidParametersException
JSimTooManyProcessesException
Method Detail |
---|
protected void life()
life
in class JSimProcess
public int getCounter()
public double getTransTq()
public double getTq()
public double getLoad()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |