com.ibm.websphere.logging.hpel.reader

Interface ServerInstanceLogRecordList

All Superinterfaces:
java.lang.Iterable<RepositoryLogRecord>

  1. public interface ServerInstanceLogRecordList
  2. 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();
 }
 
An extension for z/OS to start with a controller and get all servants (and merge them) can be seen at MergedRepository Take special note of the getChildren method on the ServerInstanceLogRecordList 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>
        }
  MapservantMap = 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

Modifier and Type Field and Description
  1. static
  2. java.lang.String
HEADER_ADDRESSSPACEID
  1. static
  2. java.lang.String
HEADER_HOSTADDRESS
  1. static
  2. java.lang.String
HEADER_HOSTNAME
  1. static
  2. java.lang.String
HEADER_HOSTTYPE
  1. static
  2. java.lang.String
HEADER_ISSERVER
  1. static
  2. java.lang.String
HEADER_ISTHINCLIENT
  1. static
  2. java.lang.String
HEADER_ISZOS
  1. static
  2. java.lang.String
HEADER_JOBID
  1. static
  2. java.lang.String
HEADER_JOBNAME
  1. static
  2. java.lang.String
HEADER_PROCESSID
  1. static
  2. java.lang.String
HEADER_PROCESSNAME
  1. static
  2. java.lang.String
HEADER_SERVER_LOCALE_COUNTRY
  1. static
  2. java.lang.String
HEADER_SERVER_LOCALE_LANGUAGE
  1. static
  2. java.lang.String
HEADER_SERVER_NAME
  1. static
  2. java.lang.String
HEADER_SERVER_TIMEZONE
  1. static
  2. java.lang.String
HEADER_SERVERNAME
  1. static
  2. java.lang.String
HEADER_SYSTEMNAME
  1. static
  2. java.lang.String
HEADER_TCBADDRESSNAME
  1. static
  2. java.lang.String
HEADER_VERBOSE_VERSION
  1. static
  2. java.lang.String
HEADER_VERSION

Method Summary

Modifier and Type Method and Description
  1. java.util.Map<java.lang.String,ServerInstanceLogRecordList>
getChildren()
Returns the children for the process of a ServerInstanceLogRecordList.
  1. java.util.Properties
getHeader()
Returns the header belonging to records from this process.
  1. java.util.Date
getStartTime()
Returns start time of this instance.
  1. java.lang.Iterable<RepositoryLogRecord>
range(int offset,int length)
Returns a subset of records from this query result.
Methods inherited from interface java.lang.Iterable
iterator

Field Detail

HEADER_VERSION

  1. static final java.lang.String HEADER_VERSION
See Also:

HEADER_VERBOSE_VERSION

  1. static final java.lang.String HEADER_VERBOSE_VERSION
See Also:

HEADER_SERVER_NAME

  1. static final java.lang.String HEADER_SERVER_NAME
See Also:

HEADER_PROCESSID

  1. static final java.lang.String HEADER_PROCESSID
See Also:

HEADER_SERVER_TIMEZONE

  1. static final java.lang.String HEADER_SERVER_TIMEZONE
See Also:

HEADER_SERVER_LOCALE_LANGUAGE

  1. static final java.lang.String HEADER_SERVER_LOCALE_LANGUAGE
See Also:

HEADER_SERVER_LOCALE_COUNTRY

  1. static final java.lang.String HEADER_SERVER_LOCALE_COUNTRY
See Also:

HEADER_HOSTNAME

  1. static final java.lang.String HEADER_HOSTNAME
See Also:

HEADER_HOSTADDRESS

  1. static final java.lang.String HEADER_HOSTADDRESS
See Also:

HEADER_HOSTTYPE

  1. static final java.lang.String HEADER_HOSTTYPE
See Also:

HEADER_ISZOS

  1. static final java.lang.String HEADER_ISZOS
See Also:

HEADER_ISSERVER

  1. static final java.lang.String HEADER_ISSERVER
See Also:

HEADER_ISTHINCLIENT

  1. static final java.lang.String HEADER_ISTHINCLIENT
See Also:

HEADER_PROCESSNAME

  1. static final java.lang.String HEADER_PROCESSNAME
See Also:

HEADER_ADDRESSSPACEID

  1. static final java.lang.String HEADER_ADDRESSSPACEID
See Also:

HEADER_JOBID

  1. static final java.lang.String HEADER_JOBID
See Also:

HEADER_JOBNAME

  1. static final java.lang.String HEADER_JOBNAME
See Also:

HEADER_SYSTEMNAME

  1. static final java.lang.String HEADER_SYSTEMNAME
See Also:

HEADER_TCBADDRESSNAME

  1. static final java.lang.String HEADER_TCBADDRESSNAME
See Also:

HEADER_SERVERNAME

  1. static final java.lang.String HEADER_SERVERNAME
See Also:

Method Detail

getHeader

  1. 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

  1. java.lang.Iterable<RepositoryLogRecord> range( int offset,
  2. int length)
Returns a subset of records from this query result.

Example of use:

  • range(offset, length) returns iterator over the length records after skipping first offset records.
  • range(offset, -1) returns iterator over the rest of records after skipping first offset records.
  • range(-offset, length) returns iterator over the length records starting with offset 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 the offset are returned.
Returns:
Iterable instance listing records in the subset.

getChildren

  1. 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

  1. 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.