public class RootConfig extends Object
This class contains helper methods that enable the user to set information used to configure instantiated Rumi objects (e.g. single or multi-threaded mode of operation, trace level etc). This class also contains methods used to obtain deployment related information (e.g. installation root etc).
| Modifier and Type | Class and Description |
|---|---|
static class |
RootConfig.ObjectConfig
Class used to store information used to configure a Rumi object.
|
| Constructor and Description |
|---|
RootConfig() |
| Modifier and Type | Method and Description |
|---|---|
static void |
flushObjectConfig(String name)
Flush the object configuration for a named set of objects
|
static boolean |
getChecked(String name)
Get checked operating mode for a named set of objects.
|
static RootConfig.ObjectConfig |
getObjectConfig(String name)
Get an object configuration object for a named set of objects.
|
static boolean |
getThreaded(String name)
Get threaded operating mode for a named set of objects.
|
static void |
setChecked(String name,
boolean val)
Set the checked operating mode for a named set of objects.
|
static void |
setThreaded(String name,
boolean val)
Set the threaded operating mode for a named set of objects.
|
public static void setThreaded(String name, boolean val)
name - The name idetifying the object set.val - Indicates whethee the objects are to operate in a single
or multi-threaded mode (true=multi-threaded)
This method sets whether objects identified by the specified name instanitiated subsequent to this call will operate in a single or multi-threaded mode. Specifying a null name will set the default threaded mode for all objects.
Each class in the system allows for single or multi-threaded mode of operation. This parameter only applies to those classes that permit concurrent multi-threaded access to their methods. Specifying the threaded mode to false causes such classes to switch off synchronization thus downgrading the services offered to operate only in the context of a single thread.
public static boolean getThreaded(String name)
name - The name idetifying the object set.setThreaded(java.lang.String, boolean)public static void setChecked(String name, boolean val)
name - The name idetifying the object set.val - Indicates the checked mode to be set
This method sets whether objects identified by the specified name initantiated subsequent to this call will operate in checked or unchecked mode. Specifying a null name will set the default checked mode for all objects. Checked mode operations perform extra parameter validation and internal state checking as compared to the unchecked state. Performance is the criteria used to decide whether to remove or keep a validation operation in the unchecked mode.
public static boolean getChecked(String name)
name - The name idetifying the object set.setChecked(java.lang.String, boolean)public static RootConfig.ObjectConfig getObjectConfig(String name)
name - The name of the object set.
This method creates a new object configuration object. The method
performs the following:
- Query getThreaded(java.lang.String), getChecked(java.lang.String),
RootConfig#getTraceLevel and RootConfig#getLogger
methods using the supplied name to initialize the object.
- Override the trace level set in the configuration object using
the
- Set the trace logger in the configuration object as the logger
with name=
public static void flushObjectConfig(String name)
name - The name of the object set.
This method clears the object config cache
Copyright © 2019 N5 Technologies, Inc. All Rights Reserved.