|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object Thread Sim_entity Link
public abstract class Link
This class provides a template for a Link which can connect two entities like routers, GridResources or any other new component that needs to use the network facilities in Gridsim.
In the network model used here, the links only introduce propogation delays. Routers are resposible for queueing and transmission delays. Also, links do not check whether the packets being sent through are of size smaller than the MTU. It is the responsibility of the upstream sender to check the size of the packet. The baud rate and the MTU attributes are stored in the links to facilitate routers and other entities that send data through a link.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected double |
baudRate_
Baud rate of this link in bits/s |
static int |
DEFAULT_BAUD_RATE
Default baud rate of a link in bits/sec |
static int |
DEFAULT_MTU
Default Maximum Transmission Unit (MTU) of a link in bytes |
static int |
DEFAULT_PROP_DELAY
Default propagation delay of a link in millisecond |
protected double |
delay_
Propagation delay of this link in millisecond |
protected int |
MILLI_SEC
A constant represents 1 second in milliseconds |
protected int |
MTU_
Maximum Transmission Unit (MTU) of this link in bytes |
Fields inherited from class Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
Link(String name,
double baudRate,
double propDelay,
int MTU)
Constructs a Link which simulates a physical link between two entities. |
Method Summary | |
---|---|
abstract void |
attach(Sim_entity end1,
Sim_entity end2)
Connects two entities using this link. |
abstract void |
attach(String end1,
String end2)
Connects two entities using this link. |
double |
getBaudRate()
Returns the baud rate of the link in bits/s. |
double |
getDelay()
Returns the tramssion delay that this link introduces. |
int |
getMTU()
Returns the Maximum Transmission Unit of this Link |
Methods inherited from class Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected double delay_
protected double baudRate_
protected int MTU_
public static final int DEFAULT_BAUD_RATE
public static final int DEFAULT_PROP_DELAY
public static final int DEFAULT_MTU
protected final int MILLI_SEC
Constructor Detail |
---|
public Link(String name, double baudRate, double propDelay, int MTU) throws ParameterException, NullPointerException
name
- Name of this LinkbaudRate
- baud rate of this link (bits/s)propDelay
- Propogation delay of the Link in milli secondsMTU
- Maximum Transmission Unit of the Link in bytes.
Packets which are larger than the MTU should be split
up into MTU size units. NullPointerException
- This happens when name is null or empty
ParameterException
- This happens for the following conditions:
Method Detail |
---|
public abstract void attach(Sim_entity end1, Sim_entity end2)
end1
- Entity attached to one end of the Linkend2
- Entity attached to the other end of the Linkpublic abstract void attach(String end1, String end2)
end1
- Entity attached to one end of the Linkend2
- Entity attached to the other end of the Linkpublic double getBaudRate()
public double getDelay()
public int getMTU()
|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |