Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.contactcenters.queue
Class EnqueueEvent

    java.lang.Object
      umontreal.iro.lecuyer.simevents.Event
          umontreal.iro.lecuyer.contactcenters.queue.EnqueueEvent

All Implemented Interfaces:
  Comparable<Event>

Direct Known Subclasses:
  EnqueueEventWithRerouting

    public class EnqueueEvent

extends Event

Represents a simulation event that will put a queued contact back in its original waiting queue. This is used for state restoration of a waiting queue.

Field Summary

Fields inherited from class umontreal.iro.lecuyer.simevents.Event
`eventTime, priority, sim`

Constructor Summary
`EnqueueEvent(DequeueEvent oldDequeueEvent)` Constructs a new enqueue event from an old dequeue event using the target queue returned by `DequeueEvent.getWaitingQueue()`.
`EnqueueEvent(WaitingQueue targetQueue, Contact contact, double queueTime, int dqType)` Constructs a new enqueue event that will put a contact `contact` into the target waiting queue `targetQueue`.
`EnqueueEvent(WaitingQueue targetQueue, DequeueEvent oldDequeueEvent)` Constructs a new enqueue event from an old dequeue event that will put a queued contact into the target waiting queue `targetQueue`.

Method Summary
`void` | `actions()`
`Contact` | `getContact()` Returns the contact to be queued when the event occurs.
`DequeueEvent` | `getNewDequeueEvent()` Returns the dequeue event representing the contact put back in the waiting queue.
`int` | `getScheduledDequeueType()` Returns the scheduled dequeue type assigned to the contact when it is queued.
`double` | `getScheduledQueueTime()` Returns the scheduled maximal queue time assigned to the contact when it is queued.
`WaitingQueue` | `getTargetWaitingQueue()` Returns the waiting queue in which the previously queued contact will be added by this event.
`String` | `toString()`

Methods inherited from class umontreal.iro.lecuyer.simevents.Event
`cancel, cancel, compareTo, getRa, priority, reschedule, schedule, scheduleAfter, scheduleBefore, scheduleNext, setPriority, setRa, setSimulator, setTime, simulator, time`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### EnqueueEvent

    public EnqueueEvent(DequeueEvent oldDequeueEvent)

  Constructs a new enqueue event from an old dequeue event using the target queue returned by `DequeueEvent.getWaitingQueue()`.

  Parameters:
    `oldDequeueEvent` - the old dequeue event to be used.

### EnqueueEvent

    public EnqueueEvent(WaitingQueue targetQueue,
                        DequeueEvent oldDequeueEvent)

  Constructs a new enqueue event from an old dequeue event that will put a queued contact into the target waiting queue `targetQueue`.

  Parameters:
    `targetQueue` - the target waiting queue.
    `oldDequeueEvent` - the old dequeue event to be used.

### EnqueueEvent

    public EnqueueEvent(WaitingQueue targetQueue,
                        Contact contact,
                        double queueTime,
                        int dqType)

  Constructs a new enqueue event that will put a contact `contact` into the target waiting queue `targetQueue`. The maximal queue time of the contact will be `queueTime` while its dequeue type is `dqType`.

  Parameters:
    `targetQueue` - the target waiting queue.
    `contact` - the contact being queued.
    `queueTime` - the maximal queue time.
    `dqType` - the dequeue type.
  Throws:
    `NullPointerException` - if `contact` or `targetQueue` are `null`.
    `IllegalArgumentException` - if `queueTime` is negative.

Method Detail

### getTargetWaitingQueue

    public WaitingQueue getTargetWaitingQueue()

  Returns the waiting queue in which the previously queued contact will be added by this event.

  Returns:
    the target waiting queue.

### getContact

    public Contact getContact()

  Returns the contact to be queued when the event occurs.

  Returns:
    the contact being queued.

### getScheduledQueueTime

    public double getScheduledQueueTime()

  Returns the scheduled maximal queue time assigned to the contact when it is queued.

  Returns:
    the scheduled maximal queue time.

### getScheduledDequeueType

    public int getScheduledDequeueType()

  Returns the scheduled dequeue type assigned to the contact when it is queued.

  Returns:
    the scheduled dequeue type.

### getNewDequeueEvent

    public DequeueEvent getNewDequeueEvent()

  Returns the dequeue event representing the contact put back in the waiting queue. This returns a non-`null` value only after the execution of the `actions()` method.

  Returns:
    the new dequeue event.

### actions

    public void actions()

  Specified by:
    `actions` in class `Event`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

To submit a bug or ask questions, send an e-mail to Richard Simard.