Interface ServerInstanceLogRecordList
- All Superinterfaces:
Iterable<RepositoryLogRecord>
Example of intended usage:
An extension for z/OS to start with a controller and get all servants (and merge them) can be seen at
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 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>
}
Map<String, ServerInstanceLogRecordList>servantMap = pid.getChildren() ;
Iterator
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionReturns the children for the process of a ServerInstanceLogRecordList.Returns the header belonging to records from this process.Returns start time of this instance.range(int offset, int length) Returns a subset of records from this query result.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Field Details
-
HEADER_VERSION
- See Also:
-
HEADER_VERBOSE_VERSION
- See Also:
-
HEADER_SERVER_NAME
- See Also:
-
HEADER_PROCESSID
- See Also:
-
HEADER_SERVER_TIMEZONE
- See Also:
-
HEADER_SERVER_LOCALE_LANGUAGE
- See Also:
-
HEADER_SERVER_LOCALE_COUNTRY
- See Also:
-
HEADER_HOSTNAME
- See Also:
-
HEADER_HOSTADDRESS
- See Also:
-
HEADER_HOSTTYPE
- See Also:
-
HEADER_ISZOS
- See Also:
-
HEADER_ISSERVER
- See Also:
-
HEADER_ISTHINCLIENT
- See Also:
-
HEADER_PROCESSNAME
- See Also:
-
HEADER_ADDRESSSPACEID
- See Also:
-
HEADER_JOBID
- See Also:
-
HEADER_JOBNAME
- See Also:
-
HEADER_SYSTEMNAME
- See Also:
-
HEADER_TCBADDRESSNAME
- See Also:
-
HEADER_SERVERNAME
- See Also:
-
-
Method Details
-
getHeader
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
Returns a subset of records from this query result.Example of use:
range(offset, length)returns iterator over thelengthrecords after skipping firstoffsetrecords.range(offset, -1)returns iterator over the rest of records after skipping firstoffsetrecords.range(-offset, length)returns iterator over thelengthrecords starting withoffsetrecord 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-offsetrecords 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 theoffsetare returned.- Returns:
- Iterable instance listing records in the subset.
-
getChildren
Map<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
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
nullif time can not be obtained.
-