|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.contactcenters.contact.TrunkGroup
public class TrunkGroup
Represents a group of trunks, i.e., phone lines or more
generally communication channels, in a contact
center. After a contact is constructed, it can be assigned
a trunk group using Contact.setTrunkGroup(umontreal.iro.lecuyer.contactcenters.contact.TrunkGroup)
.
When the contact enters the router,
a line is allocated. The contact is blocked if
a line is not available.
Constructor Summary | |
---|---|
TrunkGroup(int capacity)
Constructs a new trunk group with capacity capacity. |
Method Summary | |
---|---|
int |
getCapacity()
Returns the current capacity of this trunk group. |
String |
getName()
Returns the name associated with this object. |
Accumulate |
getStatCapacity()
Returns the statistical collector for the capacity of this trunk group through simulation time. |
Accumulate |
getStatLines()
Returns the statistical collector for the number of allocated lines through simulation time. |
void |
init()
Resets this trunk group, releasing all allocated lines. |
void |
initStat()
Initializes the two statistical collectors for the number of lines and the capacity. |
boolean |
isStatCollecting()
Determines if this trunk group is collecting statistics about the number of allocated lines and its capacity. |
int |
lines()
Returns the current number of allocated lines. |
void |
release(Contact contact)
Releases the trunk line allocated by the contact contact. |
void |
setCapacity(int capacity)
Changes the capacity to capacity. |
void |
setName(String name)
Sets the name of this object to name. |
void |
setStatCollecting(boolean b)
Sets the statistical collecting to b. |
void |
setStatCollecting(Simulator sim)
Enables statistical collecting, but associates the given simulator to the internal accumulates. |
void |
setStatCollectiong(Simulator sim)
Enables statistical collecting, and attach the simulator sim to the internal accumulates. |
boolean |
take(Contact contact)
Indicates that the contact contact enters the system and takes one line from this trunk group. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TrunkGroup(int capacity)
capacity
- the total number of lines in the trunk group.
IllegalArgumentException
- if the capacity is negative.Method Detail |
---|
public int getCapacity()
public void setCapacity(int capacity)
IllegalArgumentException
is thrown.
capacity
- the new capacity.
IllegalArgumentException
- if capacity is too small or negative.public int lines()
public void init()
initStat()
.
init
in interface Initializable
public void initStat()
IllegalStateException
.
IllegalStateException
- if statistical collecting
is disabled.public boolean take(Contact contact)
contact
- the contact allocating the line.
public void release(Contact contact)
contact
- the contact releasing the line.public boolean isStatCollecting()
public void setStatCollecting(boolean b)
b
- the statistical collecting indicator.public void setStatCollecting(Simulator sim)
sim
- the simulator associated to
the internal accumulates.public void setStatCollectiong(Simulator sim)
sim
- the given simulator.public Accumulate getStatCapacity()
setStatCollecting(boolean)
was called with true.
public Accumulate getStatLines()
setStatCollecting(boolean)
was called with true.
public String getName()
Named
getName
in interface Named
public void setName(String name)
Named
UnsupportedOperationException
if the name is read-only.
setName
in interface Named
name
- the new name of the object.public String toString()
toString
in class Object
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |