Cluster

Description

Functions to operate on the cluster

Categories

NameDescription
DataGridFunctions to operate on the cluster
SequenceFunctions to operate on Sequence across the cluster

Functions

NameSignature and Synopsis
createLocalNamedPipeboolean createLocalNamedPipe(String pipeName, int capacity)
Creates a per-JVM in-memory blocking queue/pipe for inter-thread communication.
createSchedulervoid createScheduler(String schedulerName, long pollInterval, long refreshAhead)
Creates a cluster wide scheduler for time dependent jobs
createWorkManagervoid createWorkManager(String name, int threadPool)
Creates a work manager to schedule background jobs
executeRuleFunctionvoid runRuleFunction(String workMgrName, String ruleFnURI, boolean bInPreprocessContext, Object... args)
This function runs a rule function inside the context of a work manager
getAgentIdint getAgentId()
Returns the unique id of the agent
getAgentNameString getAgentName()
Returns the agent name
getClusterNameString getClusterName()
Returns the name of the BE cluster that this agent is connected
getLocalNamedPipeCurrentSizeint getLocalNamedPipeCurrentSize(String pipeName)
Retrieves the current size of the pipe.
getSiteIdlong getSiteId()
Returns the site-id of the cluster
isEventRecoveredboolean isEventRecovered(SimpleEvent evt)
This function returns true if the passed event is received from another agent in the cluster. The function will return false if the event was created in this agent.
pollMessageFromLocalNamedPipeObject pollMessageFromLocalNamedPipe(String pipeName)
Receive a message if one is available on the pipe.
refreshEntityvoid refreshEntity(long id, int typeId, int version)
Refresh the local copy from the cluster
registerStateMachineTimeoutCallbackvoid registerStateMachineTimeoutCallback(String entityURI, String ruleFunctionURI)
Register a rule function to pre-process state machine timeouts. The pre-processor should be used to load and/or lock associated objects.
removeSchedulevoid removeSchedule(String schedulerName, String workKey)
Removes a previously scheduled task
runRuleFunctionvoid runRuleFunction(String workMgrName, String ruleFnURI, Object[] args, boolean bInPreprocessContext)
This function runs a ruleFunction continously as per the return status of the ruleFunction
scheduleEventvoid scheduleEvent(String schedulerName, String workKey, SimpleEvent event, long scheduledTime)
Schedules a simple event to be sent to the default destination after scheduledTime. The scheduled time is represented in milliseconds from January 1, 1970 (the UNIX epoch).
scheduleRepeatingEventvoid scheduleRepeatingEvent(String schedulerName, String workKey, SimpleEvent event, DateTime startingDate, long interval)
Schedules a simple event to be sent to the default destination beginning on startingDate, and repeating every interval milliseconds. It is recommended to specify starting date/time using DateTime.createTime() e.g. DateTime.createTime(2014, 0, 1, 0, 0, 0, null).
sendMessageOverLocalNamedPipevoid sendMessageOverLocalNamedPipe(String pipeName, Object message)
Send a message over the pipe.
sendMessagesOverLocalNamedPipevoid sendMessagesOverLocalNamedPipe(String pipeName, Object collection)
Send a java.util.Collection full of messages over the pipe.
stopWorkManagervoid stopWorkManager(String name)
Shuts down the work manager. This call will wait for all the current jobs to finish
typeIdToURIString typeIdToURI(int typeId)
Returns the design time URI for the typeId
waitForMessageFromLocalNamedPipeObject waitForMessageFromLocalNamedPipe(String pipeName, long timeoutMillis)