- TIBCO BusinessEvents®
- Standard
- Engine

# Engine

## Description

Functions to get information about the Engine.

## Categories

Name | Description
--- | ---
`Locale` | Functions to get info about the locale.
`Profiler` | Functions to profile the engine.
`Rtc` | Functions directly related to the RTC.
`Variable` | Functions to set and get Engine Variable.

## Functions

Name | Signature and Synopsis
--- | ---
`assertEvent_Async` | `void assertEvent_Async()` Asserts a simple event using WorkManager
`clusterSubscriptionLoadOnly` | `void clusterSubscriptionLoadOnly()` Loads the Entity that comes from Cluster Subscription into the working memory only and does not execute any rule for it.This can only be used in the preprocessor for the Entity which Subscribes Cluster.
`currentRule` | `Object currentRule()` Returns currently executing Rule, or 'null' if there is none.
`currentRuleActions` | `Object[] currentRuleActions` Returns currently executing Rule's Actions, or 'null' if there is none.
`currentRuleConditions` | `Object[] currentRuleConditions()` Returns currently executing Rule's Conditions, or 'null' if there is none.
`currentRuleFunction` | `Object currentRuleFunction()` Returns currently executing RuleFunction, or 'null' if there is none.
`currentRuleIdentifiers` | `Object[] currentRuleIdentifiers()` Returns currently executing Rule's Identifiers (arguments), or 'null' if there is none.
`engineName` | `String engineName ()` Returns the name of the TIBCO BusinessEvents engine.
`executeRules` | `void executeRules()` Execute Rules in the preprocessor context.
`executeRulesAsync` | `void executeRulesAsync(String workManagerID)` Execute Rules in the preprocessor context. Execution is done in parallel mode using the supplied work-manager
`executionContext` | `String[] executionContext()` Returns the current execution context. The first element in the String[] indicates where this call is executing under. The remaining elements in the String[] contains the objects that associated with the context. For example, if this is executing in Rule A.B.C and the scope is InstanceX. This function will returns { $1Rule=A.B.C$1, $1InstanceX@id=12@extId=123$1 }.
`gc` | `void gc()` Runs the Java Garbage Collection.
`invokeRule` | `Object[] invokeRule(String uri, Object[] inputSet, boolean dirtyRead)` Find all the matched tuples of a rule given partial input set. And for each matched tuple, execute the rule action.
`invokeRuleFunction` | `Object invokeRuleFunction(String uri, Object[] arguments)` Invoke a rule function by name.
`jvmMemoryFree` | `long jvmMemoryFree ()` Returns an estimate of the free memory available to the JVM.
`jvmMemoryMax` | `long jvmMemoryMax ()` Returns the maximum memory size of the JVM.
`jvmMemoryUsed` | `long jvmMemoryUsed ()` Returns an estimate of the used memory in the JVM.
`loadResourceAsByte` | `Object loadResourceAsByte(String uri)` When a relative path to a file is provided, then the byte representation of the file contents are returned.
`loadResourceAsString` | `String loadResourceAsString(String uri, String encoding)` When a relative path to a file is provided, then the contents of the file are returned in String format. The type of encoding to be used can be determined by the user. In case no encoding is provided, then UTF-8 is used by default.
`numberOfEvents` | `int numberOfEvents()` Returns the total number of events exist in the working memory
`numberOfInstances` | `int numberOfInstances()` Returns the total number of instances exist in the working memory
`numberOfRulesFired` | `long numberOfRulesFired ()` Returns the total number of rules fired in the current working memory since the counter was last reset.
`resetNumberOfRulesFired` | `void resetNumberOfRulesFired ()` Resets the counter that tracks the total number of rules fired in the current working memory.
`ruleFunctionName` | `String ruleFunctionName()` Returns the name of the currently executing RuleFunction, or "" if there is none.
`ruleName` | `String ruleName()` Returns the name of the currently executing Rule, or "" if there is none.
`sessionIndex` | `int sessionIndex ()` Returns the current Index of the RuleSession in the EAR's. If numLocal is provided, then it will give that info.
`sessionName` | `String sessionName ()` Returns the current RuleSession Name.
`shutdown` | `void shutdown(boolean immediate)` Shuts down the BusinessEvents engine.
`sleep` | `void sleep(long millisec)` Put current rule session to sleep. Caution! In case of single-threaded RTC, this method may block current thread as well as all other rule sessions.
`threadName` | `String threadName()` Gets the name of the current thread.