public final class EngineServices extends java.lang.Object
Engine services
Provides access to engine level services. A transaction is required to access methods in this class.
Modifier and Type | Class and Description |
---|---|
static class |
EngineServices.ThrottleState
Throttle state
|
Modifier and Type | Method and Description |
---|---|
static int |
getEngineInstance()
Deprecated.
|
static java.lang.String |
getEngineName()
Deprecated.
This method is deprecated, please use
the system property:
System.getProperty("com.kabira.platform.jvm.name"); |
static java.lang.String |
getNodeName()
Deprecated.
This method is deprecated, please use
the system property:
System.getProperty("com.kabira.platform.node.name"); |
static EngineServices.ThrottleState |
getThrottleState()
Check the state of throttling
|
static boolean |
isStopping()
Deprecated.
This method is deprecated, please use
either a ShutdownHook
(see java.lang.Runtime.addShutdownHook()
or a component notifier
(see com.kabira.platform.component).
|
static void |
stop(int returnCode)
Deprecated.
This method is deprecated, please use
System.stop(0);
|
static EngineServices.ThrottleState |
throttle()
Throttle incoming work if necessary
|
@Deprecated public static final boolean isStopping()
Determine if engine is shutting down
@Deprecated public static final void stop(int returnCode)
Schedule the current engine to exit
returnCode
- Return value for engine@Deprecated public static final java.lang.String getEngineName()
System.getProperty("com.kabira.platform.jvm.name");
Get the name of this engine.
@Deprecated public static final java.lang.String getNodeName()
System.getProperty("com.kabira.platform.node.name");
Node name for shared memory
Get the node name associated with the shared memory that this engine is running against.
@Deprecated public static final int getEngineInstance()
Access engine instance
Get the engine instance for the engine. All engines on a node have a unique engine instance number.
public static final EngineServices.ThrottleState throttle()
Throttle incoming work if necessary
If the percentage of shared memory in use exceeds the configured throttle threshold (50% by default), the throttle operation will block a little to slow down incoming work. Throttled is returned from the operation when in this state. When shared memory utilization becomes critical (80% by default) Stall is returned from the throttle operation after blocking for a longer period of time. The application should stop accepting incoming work at this point and attempt to complete processing already accepted work to clear shared memory space.
public static final EngineServices.ThrottleState getThrottleState()
Check the state of throttling
Get the current throttle state.