public class CACEvent
extends SimEvent
Provides a set of events to be used in the CAC simulator. These events are:
Although the CACEvent class is common for all events, its meaning (i.e.
action type) depends on the constructor used to get an instance. Take a look
on the description of the constructors to obtain more information.
| Modifier and Type | Class and Description |
|---|---|
static class |
CACEvent.EventType
Type of event.
|
| Constructor and Description |
|---|
CACEvent(double eventTime,
int demandId,
double durationInSeconds,
double trafficVolumeInErlangs,
java.util.Map<java.lang.String,java.lang.String> attributes)
Constructor to define a 'connection request' event.
|
CACEvent(double eventTime,
long connIdToRelease)
Constructor to define a 'connection release' event.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.
|
CACEvent.EventType |
getEventType()
Returns the event type.
|
long |
getReleaseConnectionId()
Returns the connection identifier of the connection to be released.
|
java.util.Map<java.lang.String,java.lang.String> |
getRequestAttributes()
Returns the attributes of the requested connection.
|
int |
getRequestDemandId()
Returns the demand identifier of the requested connection.
|
double |
getRequestDurationInSeconds()
Returns the duration of the requested connection.
|
double |
getRequestTrafficVolumeInErlangs()
Returns the traffic volume of the requested connection.
|
int |
hashCode()
Returns a hash code value for the object.
|
java.lang.String |
toString()
Returns a
String representation of the object. |
public CACEvent(double eventTime,
int demandId,
double durationInSeconds,
double trafficVolumeInErlangs,
java.util.Map<java.lang.String,java.lang.String> attributes)
Constructor to define a 'connection request' event.
eventTime - Arrival time of the requestdemandId - Demand identifierdurationInSeconds - Duration (in Erlangs)trafficVolumeInErlangs - Traffic volume (in Erlangs)attributes - Map for user-defined attributes. The key (String value) in the map will be the attribute name and the value (String value) will be whatever value is stored in that attribute. If null, it will be assumed to be an empty HashMappublic CACEvent(double eventTime,
long connIdToRelease)
Constructor to define a 'connection release' event.
eventTime - Event timeconnIdToRelease - Connection identifierpublic CACEvent.EventType getEventType()
public java.lang.String toString()
String representation of the object.String representation of the objectpublic int getRequestDemandId()
public double getRequestDurationInSeconds()
public double getRequestTrafficVolumeInErlangs()
public java.util.Map<java.lang.String,java.lang.String> getRequestAttributes()
public long getReleaseConnectionId()
public boolean equals(java.lang.Object o)
o - Reference object with which to comparetrue if this object is the same as the o argument; false otherwisepublic int hashCode()
HashMap.