|
|||||||||
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 |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
private int |
counter
Transactions counter |
private double |
cs
Variation of the mean value |
private QueueWithServer |
queue
Assigned queue |
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(java.lang.String name,
cz.zcu.fav.kiv.jsim.JSimSimulation simulation,
double ts,
double cs,
QueueWithServer queue)
Creates new server |
Method Summary | |
---|---|
int |
getCounter()
Get count of managed transactions |
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 - waits time Ts with some Cs and then removes transaction from queue |
Methods inherited from class cz.zcu.fav.kiv.jsim.JSimProcess |
---|
activate, activateNow, blockOnSemaphore, cancel, compareTo, copyToMessageClipboard, createDetailedInfoWindow, equals, error, getDetailedInformationArray, getMessageBox, getObjectListItemDescription, getParent, getPrivateLock, getProcessName, getProcessNumber, getProcessState, getProcessStateAsString, getReady, getSenderIAmWaitingFor, getScheduleTime, hasBeenStarted, hasEmptyMessageClipboard, hashCode, hold, isIdle, mainSwitchingRoutine, message, messageNoNL, passivate, reactivate, readFromClipboard, receiveMessageWithBlocking, receiveMessageWithBlocking, receiveMessageWithBlocking, receiveMessageWithBlocking, receiveMessageWithoutBlocking, receiveMessageWithoutBlocking, receiveMessageWithoutBlocking, receiveMessageWithoutBlocking, run, sendMessageWithBlocking, sendMessageWithBlocking, sendMessageWithBlocking, sendMessageWithoutBlocking, sendMessageWithoutBlocking, sendMessageWithoutBlocking, setProcessState, start, toString, unblockFromSemaphore, wait |
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 double cs
private QueueWithServer queue
private int counter
private double transTq
Constructor Detail |
---|
public Server(java.lang.String name, cz.zcu.fav.kiv.jsim.JSimSimulation simulation, double ts, double cs, QueueWithServer queue) throws cz.zcu.fav.kiv.jsim.JSimSimulationAlreadyTerminatedException, cz.zcu.fav.kiv.jsim.JSimInvalidParametersException, cz.zcu.fav.kiv.jsim.JSimTooManyProcessesException
name
- server namesimulation
- simulation objectts
- defined Tscs
- defined Csqueue
- assigned input queue
cz.zcu.fav.kiv.jsim.JSimSimulationAlreadyTerminatedException
cz.zcu.fav.kiv.jsim.JSimInvalidParametersException
cz.zcu.fav.kiv.jsim.JSimTooManyProcessesException
Method Detail |
---|
protected void life()
life
in class cz.zcu.fav.kiv.jsim.JSimProcess
public int getCounter()
public double getTransTq()
public double getTq()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |