com.ibm.websphere.logging.hpel.reader
Interface ServerInstanceLogRecordList
-
- All Superinterfaces:
- java.lang.Iterable<RepositoryLogRecord>
public interface ServerInstanceLogRecordList extends java.lang.Iterable<RepositoryLogRecord>
A list of log records originating from one process.Example of intended usage:
for (ServerInstanceLogRecordList pid: reader.getLogListForCurrentServerInstance()) { Properties header = pid.getHeader(); <process header> for (RepositoryLogRecord record: pid) { <process record> } pid.close(); }
MergedRepository
Take special note of the getChildren method on theServerInstanceLogRecordList
object. An example of getting all records for the controller and all servants on z/OS could look like this:for (ServerInstanceLogRecordList pid: reader.getLogListForCurrentServerInstance()) { Properties header = pid.getHeader(); <process header> for (RepositoryLogRecord record: pid) { // This PID is the controller <process controller record> } Map
servantMap = pid.getChildren() ; Iterator servantKeys = servantMap.keySet().iterator() ; while (servantKeys.hasNext()) { // Map label has key information to identify which child process. This can be used to get just one servant, // here we are going to print the results for all servants String label = servantKeys.next() ; ServerInstanceLogRecordList servantRecs = servantMap.get(label) ; // Extract the child process ServerInstanceLogRecordList Properties subHeader = servantRecs.getHeader() ; for (RepositoryLogRecord subRec: servantRecs) { // Pull all records for this servant <process servant record> } servantRecs.close() ; } pid.close(); }
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
HEADER_ADDRESSSPACEID
static java.lang.String
HEADER_FULL_SERVER_NAME
static java.lang.String
HEADER_FULLHOSTNAME
static java.lang.String
HEADER_HOSTADDRESS
static java.lang.String
HEADER_HOSTNAME
static java.lang.String
HEADER_HOSTTYPE
static java.lang.String
HEADER_ISSERVER
static java.lang.String
HEADER_ISTHINCLIENT
static java.lang.String
HEADER_ISZOS
static java.lang.String
HEADER_JOBID
static java.lang.String
HEADER_JOBNAME
static java.lang.String
HEADER_PROCESSID
static java.lang.String
HEADER_PROCESSNAME
static java.lang.String
HEADER_SERVER_LOCALE_COUNTRY
static java.lang.String
HEADER_SERVER_LOCALE_LANGUAGE
static java.lang.String
HEADER_SERVER_NAME
static java.lang.String
HEADER_SERVER_TIMEZONE
static java.lang.String
HEADER_SERVERNAME
static java.lang.String
HEADER_SYSTEMNAME
static java.lang.String
HEADER_TCBADDRESSNAME
static java.lang.String
HEADER_VERBOSE_VERSION
static java.lang.String
HEADER_VERSION
-
Method Summary
Methods Modifier and Type Method and Description java.util.Map<java.lang.String,ServerInstanceLogRecordList>
getChildren()
Returns the children for the process of a ServerInstanceLogRecordList.java.util.Properties
getHeader()
Returns the header belonging to records from this process.java.util.Date
getStartTime()
Returns start time of this instance.java.lang.Iterable<RepositoryLogRecord>
range(int offset, int length)
Returns a subset of records from this query result.
-
-
-
Field Detail
-
HEADER_VERSION
static final java.lang.String HEADER_VERSION
- See Also:
- Constant Field Values
-
HEADER_VERBOSE_VERSION
static final java.lang.String HEADER_VERBOSE_VERSION
- See Also:
- Constant Field Values
-
HEADER_SERVER_NAME
static final java.lang.String HEADER_SERVER_NAME
- See Also:
- Constant Field Values
-
HEADER_PROCESSID
static final java.lang.String HEADER_PROCESSID
- See Also:
- Constant Field Values
-
HEADER_FULL_SERVER_NAME
static final java.lang.String HEADER_FULL_SERVER_NAME
- See Also:
- Constant Field Values
-
HEADER_SERVER_TIMEZONE
static final java.lang.String HEADER_SERVER_TIMEZONE
- See Also:
- Constant Field Values
-
HEADER_SERVER_LOCALE_LANGUAGE
static final java.lang.String HEADER_SERVER_LOCALE_LANGUAGE
- See Also:
- Constant Field Values
-
HEADER_SERVER_LOCALE_COUNTRY
static final java.lang.String HEADER_SERVER_LOCALE_COUNTRY
- See Also:
- Constant Field Values
-
HEADER_HOSTNAME
static final java.lang.String HEADER_HOSTNAME
- See Also:
- Constant Field Values
-
HEADER_FULLHOSTNAME
static final java.lang.String HEADER_FULLHOSTNAME
- See Also:
- Constant Field Values
-
HEADER_HOSTADDRESS
static final java.lang.String HEADER_HOSTADDRESS
- See Also:
- Constant Field Values
-
HEADER_HOSTTYPE
static final java.lang.String HEADER_HOSTTYPE
- See Also:
- Constant Field Values
-
HEADER_ISZOS
static final java.lang.String HEADER_ISZOS
- See Also:
- Constant Field Values
-
HEADER_ISSERVER
static final java.lang.String HEADER_ISSERVER
- See Also:
- Constant Field Values
-
HEADER_ISTHINCLIENT
static final java.lang.String HEADER_ISTHINCLIENT
- See Also:
- Constant Field Values
-
HEADER_PROCESSNAME
static final java.lang.String HEADER_PROCESSNAME
- See Also:
- Constant Field Values
-
HEADER_ADDRESSSPACEID
static final java.lang.String HEADER_ADDRESSSPACEID
- See Also:
- Constant Field Values
-
HEADER_JOBID
static final java.lang.String HEADER_JOBID
- See Also:
- Constant Field Values
-
HEADER_JOBNAME
static final java.lang.String HEADER_JOBNAME
- See Also:
- Constant Field Values
-
HEADER_SYSTEMNAME
static final java.lang.String HEADER_SYSTEMNAME
- See Also:
- Constant Field Values
-
HEADER_TCBADDRESSNAME
static final java.lang.String HEADER_TCBADDRESSNAME
- See Also:
- Constant Field Values
-
HEADER_SERVERNAME
static final java.lang.String HEADER_SERVERNAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getHeader
java.util.Properties getHeader()
Returns the header belonging to records from this process. These properties help describe the process and environment that the log records originated from.- Returns:
- properties belonging to all records in this list.
-
range
java.lang.Iterable<RepositoryLogRecord> range(int offset, int length)
Returns a subset of records from this query result.Example of use:
range(offset, length)
returns iterator over thelength
records after skipping firstoffset
records.range(offset, -1)
returns iterator over the rest of records after skipping firstoffset
records.range(-offset, length)
returns iterator over thelength
records starting withoffset
record before last.range(0, -1)
returns iterator over all records in the result.
- Parameters:
offset
- the number of records to skip from the beginning of the result. A negative value means to skip-offset
records from the end of the result. Values greater than#size()
will result in an empty subset being returned.length
- the maximum number of records to include in this subset. A negative value means that all records starting from theoffset
are returned.- Returns:
- Iterable instance listing records in the subset.
-
getChildren
java.util.Map<java.lang.String,ServerInstanceLogRecordList> getChildren()
Returns the children for the process of a ServerInstanceLogRecordList. ServerInstanceLogRecordList represents the log records for a given process. A process with subprocesses will return a map with each child subprocess represented by a ServerInstanceLogRecordList. The key to each entry is computed internally, and the caller must invoke this method in order to obtain the valid key for a specific entry.- Returns:
- the map that represents the children. Each child subprocess is an entry in the map.
-
getStartTime
java.util.Date getStartTime()
Returns start time of this instance. Start time is the time of the first log or trace record written by this instance.- Returns:
- start time as a Date object or
null
if time can not be obtained.
-
-