public enum QueueOverflowPolicy extends Enum<QueueOverflowPolicy>
ReleaseParameters
. An event queue holds a number of
event arrival times with any respective payload provided with the event.
A reference to the event itself is only held when it happens to be the
payload, e.g., for an AsyncObjectEvent
associated with a
Timer
.Enum Constant and Description |
---|
DISABLE
Represents the "DISABLE" policy which means, when an arrival occurs,
no queuing takes place, thus no overflow can happen.
|
EXCEPT
Represents the "EXCEPT" policy which means, when an arrival
occurs and its event time and payload should be queued but the queue
already holds a number of event times and payloads equal to the initial
queue length, the
fire() method shall throw an
ArrivalTimeQueueOverflowException . |
IGNORE
Represents the "IGNORE" policy which means, when an arrival occurs
and its event time and payload should be queued, but the queue already
holds a number of event times and payloads equal to the initial queue
length, the arrival is ignored.
|
REPLACE
Represents the "REPLACE" policy which means, when an arrival occurs
and should be queued but the queue already holds a number of event times
and payloads equal to the initial queue length, the information for this
arrival replaces a previous arrival.
|
SAVE
Represents the "SAVE" policy which means, when an arrival occurs
and should be queued but the queue is full, the queue is lengthened
and the arrival time and payload are saved.
|
Modifier and Type | Method and Description |
---|---|
String |
value()
Determines the string corresponding to this value.
|
static QueueOverflowPolicy |
value(String value)
Converts a string into a policy type.
|
static QueueOverflowPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static QueueOverflowPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final QueueOverflowPolicy DISABLE
ActiveEvent
with no payload and instances
of RealtimeThread
with PeriodicParameters
. In contrast
to IGNORE
, all incoming events increment the pending fire or
release count, respectively. For this reason, it may not be used with
an event handler that supports an event payload or any instance of
Schedulable
with SporadicParameters
. This policy is
also the default for PeriodicParameters
. Instances of
RealtimeThread
with null
release parameters
have this policy implicitly, as they do not have an event queue either.public static final QueueOverflowPolicy EXCEPT
fire()
method shall throw an
ArrivalTimeQueueOverflowException
. When fire is used within a
Timer
, the exception is ignored and the fire does nothing, i.e.,
it acts the same as ``IGNORE''.public static final QueueOverflowPolicy IGNORE
public static final QueueOverflowPolicy REPLACE
public static final QueueOverflowPolicy SAVE
SAVE
policy grows the arrival time queue as necessary,
for the SAVE
policy the initial queue length is only
an optimization. It is also the default for AperiodicParameters
.public static QueueOverflowPolicy[] values()
for (QueueOverflowPolicy c : QueueOverflowPolicy.values()) System.out.println(c);
public static QueueOverflowPolicy valueOf(String name)
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullname
- the name of the enum constant to be returned.public String value()
public static QueueOverflowPolicy value(String value)
value
- is the string to convert.aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.