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 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 a dictionary of additional information about this component corresponding to the specified category.
 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

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 a dictionary of additional information about this component corresponding to the specified category.

This can be used to retrieve a dictionary providing any category of information exposed by this component, such as the command line arguments or environment variables used to start it.

This action provides the same information that is exposed by the "/info/CATEGORY" endpoint of REST API. See the Component Management REST API documentation for more details of the available categories.
Parameters:
category - The category to access (without a leading slash), for example "argv". Passing an empty string returns the basic component information, also available under the "/info" REST endpoint. An exception is thrown if a non-existent category is specified.
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, which will have leading and trailing whitespace stripped. Keys may not be empty.
value - The value associated with the user status value.
Since:
9.10