Developing Apama Applications > Apama EPL Reference > Types > Type properties summary
Type properties summary
Apama type properties include the following:
*Indexable — An indexable type can be referred to by a qualifier in an event template.
*Parseable — A parseable type can be parsed and has canParse() and parse()methods. The type can be received by the correlator.
*Routable — A routable type can be a field in an event that is
*Sent by the route statement
*Sent by the send...to or enqueue...to statement
*Sent by the enqueue statement
*Sent outside the correlator with the emit statement
*Comparable — A comparable type can be used as follows:
*Dictionary key
*Item in a sequence on which you can call sort() or indexOf()
*Stream query partition key
*Stream query group key
*Stream query window with-unique key
*Stream query equijoin key
*Potentially cyclic — A potentially cyclic type uses the @n notation when it is parsed or converted to a string. When a potentially cyclic type is cloned, the correlator uses an algorithm that preserves aliases. See Potentially cyclic types
*Acyclic — An acyclic type is a type that is not potentially cyclic.
*E-free — E-free types cannot contain references to instances of a particular event type E. This property is used only to determine whether E is acyclic.
The following table shows the properties of each Apama type.
Type
Indexable
Parseable
Routable
Comparable
Acyclic
E-free
boolean
decimal
 1
float
 1
integer
string
location
Channel
2
Exception
context
 3
listener
chunk
stream
action
sequence
dictionary
event E
 4
 4
Yes. This type has the corresponding property.
1 Attempts to use a NaN in a key terminates the monitor instance.
2 A Channel object is parseable only when it contains a string.
3 Although a context can be enqueued, it is not parseable, so the correlator will reject it from the input queue with a warning.
No. This type does not have the corresponding property.
This type inherits the corresponding property from its constituent types, that is, the item type in a sequence, the key and item types in a dictionary, the types of fields in an event. The type has the corresponding property only when all its constituent types have that property.
4 An event defined inside a monitor cannot be received from an external source nor emitted from that correlator. An event defined inside a monitor can be sent or enqueued only within the same correlator.
The type is comparable only when all its constituent types are both comparable and acyclic.
An event E is acyclic only when all its constituent types are both acyclic and E-free.
Examples
The following code provides examples of event type definitions and their properties.
// You can do everything with "Tick", including index both its fields.

event Tick {
string symbol;
float price;
}

// You can do everything with "Order", except refer to its target or
// properties fields in an event template.

event Order {
string customer;
Tick target;
string symbol;
float quantity;
dictionary<string,string> properties;
}

// The correlator cannot receive the next event as an external event and
// you cannot usefully enqueue it, but you can send it, route it, or
// enqueue it to a context.

event SubscriptionRequest {
string channel;
context recipient;
}

// You can do very little with this event except access its members and
// methods. It cannot be routed, you cannot sort sequence<TimeParse>,
// trying to group a stream query by TimeParse is illegal, and so on.

event TimeParse {
import "TimeFormatPlugin" as TF;
string pattern;
chunk compiledPattern;
}

// This has all the same restrictions as TimeParse, but is also
// potentially cyclic, so will use the @n format when parsed or
// converted to a string.

event Room {
string roomName;
float squareFeet;
sequence<Room> adjacentRooms;
sequence<Employee> occupants;
}
Copyright © Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its Subsidiaries and or/its Affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.