public class DataGrid
extends java.lang.Object
Programs use it to create Connection
and to set log levels.
Programs do not instantiate this class.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TIB_LOG_LEVEL_DEBUG
Debug -- output trace entries for all events (debug, verbose,
information, warning and severe events).
|
static java.lang.String |
TIB_LOG_LEVEL_INFO
Info -- output trace entries for information, warning
and severe events.
|
static java.lang.String |
TIB_LOG_LEVEL_OFF
Off -- disable all tracing.
|
static java.lang.String |
TIB_LOG_LEVEL_SEVERE
Severe -- output trace entries only for severe events.
|
static java.lang.String |
TIB_LOG_LEVEL_VERBOSE
Verbose -- output trace entries for verbose, information,
warning and severe events.
|
static java.lang.String |
TIB_LOG_LEVEL_WARN
Warn -- output trace entries for warning and severe
events.
|
Modifier and Type | Method and Description |
---|---|
static Connection |
connect(java.lang.String realmURL,
java.lang.String gridName,
java.util.Properties props)
Connect to a ActiveSpaces data grid, and create a Connection object.
|
static java.lang.String |
getVersionInformation()
Version of the ActiveSpaces Java client library (Java archive file).
|
static void |
setLogFiles(java.lang.String filePrefix,
long maxFileSize,
int maxFiles,
java.util.Properties properties)
Arrange rotating log files.
|
static void |
setLogHandler(LogHandler handler,
java.util.Properties properties)
Register a global log handler.
|
static void |
setLogLevel(java.lang.String level)
Set the ActiveSpaces log trace level.
|
public static final java.lang.String TIB_LOG_LEVEL_OFF
setLogLevel
,
Constant Field Valuespublic static final java.lang.String TIB_LOG_LEVEL_SEVERE
setLogLevel
,
Constant Field Valuespublic static final java.lang.String TIB_LOG_LEVEL_WARN
setLogLevel
,
Constant Field Valuespublic static final java.lang.String TIB_LOG_LEVEL_INFO
setLogLevel
,
Constant Field Valuespublic static final java.lang.String TIB_LOG_LEVEL_VERBOSE
setLogLevel
,
Constant Field Valuespublic static final java.lang.String TIB_LOG_LEVEL_DEBUG
setLogLevel
,
Constant Field Valuespublic static Connection connect(java.lang.String realmURL, java.lang.String gridName, java.util.Properties props) throws DataGridException
realmURL
- The URL to use for getting FTL realm server information.gridName
- The gridName identifies the data grid to which this
call connects. Passing \c NULL selects the default data grid (which in
ActiveSpaces 3.0 is the only data grid supported).props
- Optional, null to omit
DataGridException
- in case of failurespublic static java.lang.String getVersionInformation()
Programs can use this string to output the ActiveSpaces version in a start banner or in debug output.
public static void setLogLevel(java.lang.String level) throws DataGridException
This call sets the global log trace level for low-level DataGrid internal calls.
For information about tuning the log level separately for individual elements, see the topic Log Levels in the book TIBCO ActiveSpaces Development.
level
- The call sets the level to this value.DataGridException
- in case of failuresTIB_LOG_LEVEL_OFF
,
TIB_LOG_LEVEL_SEVERE
,
TIB_LOG_LEVEL_WARN
,
TIB_LOG_LEVEL_INFO
,
TIB_LOG_LEVEL_VERBOSE
,
TIB_LOG_LEVEL_DEBUG
public static void setLogFiles(java.lang.String filePrefix, long maxFileSize, int maxFiles, java.util.Properties properties) throws DataGridException
The filename extension .0 indicates the current log file. Rotation shifts each file by incrementing its numeric extension. If the number of files would exceed the maximum, rotation deletes the oldest file.
filePrefix
- All log files begin with this filename prefix.maxFileSize
- ActiveSpaces rotates the log files when the current log file
exceeds this limit (in bytes).
This value must be greater than 102400 (100 kilobytes).maxFiles
- ActiveSpaces limits the number of log files to this maximum.properties
- Reserved for future use.
To ensure forward compatibility, programmers must supply null.DataGridException
- in case of failurespublic static void setLogHandler(LogHandler handler, java.util.Properties properties) throws DataGridException
If you register a log handler (at most one), then ActiveSpaces directs all log statements to that handler.
handler
- ActiveSpaces invokes this handler to process all log statements.properties
- Reserved for future use.
To ensure forward compatibility, programmers must supply null.DataGridException
- in case of failures