com.apama.correlator
Event Component


EPL interface to the generic component management functionality of the correlator.
Constant summary
 integerCONNECT_LEGACY := 0

Argument for attach/detachAsEventConsumer - use legacy mode. In this mode, all events are delivered in serial to the receiver on the default channel.
 integerCONNECT_PARALLEL := 1

Argument for attach/detachAsEventConsumer - use parallel mode. In this mode, all events are delivered in parallel per channel.
 
Action summary
 voidstatic attachAsEventConsumerTo(string host, integer port, sequence<string> channels, boolean disconnectSlow, integer connectMode)

Connect to another Apama component to receive events on the specified channels. connectMode should be one of CONNECT_LEGACY or CONNECT_PARALLEL.
 voidstatic deleteUserStatus(string name)

Delete a specific user added status.
 voidstatic detachAsEventConsumerFrom(string host, integer port, sequence<string> channels, integer connectMode)

Disconnect from another Apama component to receive events on the specified channels. connectMode should be one of CONNECT_LEGACY or CONNECT_PARALLEL.
 stringstatic getComponentLogicalId()

Get the correlator's physical ID; please use getComponentPhysicalId instead.
Deprecated:
Use getComponentPhysicalId instead.
 stringstatic getComponentName()

Get the component name of the correlator.
 stringstatic getComponentPhysicalId()

Get a unique identifier for this correlator instance.
 integerstatic getComponentPort()

Get the port the correlator is running on.
 dictionary<stringstring>static getConfigProperties()

Return a dictionary of all the configuration properties defined for this component. Includes both properties defined in .properties files and on the command line.
 stringstatic getHostname()

Get the hostname of the server the correlator is running on.
 dictionary<stringstring>static getInfo(string category)

Get information from the REST API under the /info/ endpoint. Will throw if a non-existent category is requested.
 stringstatic getLicenseMode()

Get the current license mode of the correlator - either "nolicensefile" or "licensefilesupplied".
 integerstatic getNumberCPUs()

Get the number of CPUs the correlator has available to it.
 com.apama.correlator.EngineStatusstatic getStatus()

Get the correlator status, internal values and user added stats.
 voidstatic incrementUserStatus(string name, integer change)

Increment a user status value. Status value must either not exist, be the empty string, or be set to a string representation of an integer.
 booleanstatic isExternallyClocked()

Get whether or not correlator is running with external clocking on.
 voidstatic setUserStatus(string name, string value)

Set a specific value on a user added status. If the status does not already exist, this will add it.
 
Constant detail

CONNECT_LEGACY

integer CONNECT_LEGACY := 0
Argument for attach/detachAsEventConsumer - use legacy mode. In this mode, all events are delivered in serial to the receiver on the default channel.

CONNECT_PARALLEL

integer CONNECT_PARALLEL := 1
Argument for attach/detachAsEventConsumer - use parallel mode. In this mode, all events are delivered in parallel per channel.
Action detail

attachAsEventConsumerTo

void static attachAsEventConsumerTo(string host, integer port, sequence<string> channels, boolean disconnectSlow, integer connectMode)
Connect to another Apama component to receive events on the specified channels. connectMode should be one of CONNECT_LEGACY or CONNECT_PARALLEL.
Parameters:
host
port
channels
disconnectSlow
connectMode

deleteUserStatus

void static deleteUserStatus(string name)
Delete a specific user added status.
Parameters:
name - The name of the user status value to delete.
Since:
9.10

detachAsEventConsumerFrom

void static detachAsEventConsumerFrom(string host, integer port, sequence<string> channels, integer connectMode)
Disconnect from another Apama component to receive events on the specified channels. connectMode should be one of CONNECT_LEGACY or CONNECT_PARALLEL.
Parameters:
host
port
channels
connectMode

getComponentLogicalId

string static getComponentLogicalId()
Deprecated:
Use getComponentPhysicalId instead.
Get the correlator's physical ID; please use getComponentPhysicalId instead.

getComponentName

string static getComponentName()
Get the component name of the correlator.

This is the display name for this correlator, provided when the correlator is started.

getComponentPhysicalId

string static getComponentPhysicalId()
Get a unique identifier for this correlator instance.

A new unique identifier is generated each time a correlator process is started or restarted, even for correlators on different hosts, or if the correlator is persistent.

getComponentPort

integer static getComponentPort()
Get the port the correlator is running on.

This is the main port number; extra ports specified via configuration files are not accessible from this API.

getConfigProperties

dictionary<stringstring> static getConfigProperties()
Return a dictionary of all the configuration properties defined for this component. Includes both properties defined in .properties files and on the command line.
Since:
10.3.1

getHostname

string static getHostname()
Get the hostname of the server the correlator is running on.

getInfo

dictionary<stringstring> static getInfo(string category)
Get information from the REST API under the /info/ endpoint. Will throw if a non-existent category is requested.
Parameters:
category - The category to access; see user doc for supported categories. Only the word is required; do not prepend a '/'. Passing the empty string will return '/info'.
Since:
10.2

getLicenseMode

string static getLicenseMode()
Get the current license mode of the correlator - either "nolicensefile" or "licensefilesupplied".

getNumberCPUs

integer static getNumberCPUs()
Get the number of CPUs the correlator has available to it.

getStatus

com.apama.correlator.EngineStatus static getStatus()
Get the correlator status, internal values and user added stats.
Returns:
EngineStatus a representation of all status values including user added values.
Since:
9.10

incrementUserStatus

void static incrementUserStatus(string name, integer change)
Increment a user status value. Status value must either not exist, be the empty string, or be set to a string representation of an integer.
Parameters:
name - The name of the user status to add.
change - The amount to add to the counter. May be negative to decrement.
Since:
10.3.1

isExternallyClocked

boolean static isExternallyClocked()
Get whether or not correlator is running with external clocking on.

setUserStatus

void static setUserStatus(string name, string value)
Set a specific value on a user added status. If the status does not already exist, this will add it.

Note the value must be in string format.

For example:
 integer counter := 100; 
 com.apama.correlator.Component.setUserStatus("myCounter",counter.toString()) 
The key and value can be seen in the Watch tab of the running correlator.
 http://host:port/correlator/status 
Parameters:
name - The name of the user status to add.
value - The value associated with the user status value.
Since:
9.10