com.ibm.websphere.logging.hpel.reader

Class RepositoryReaderImpl

  1. java.lang.Object
  2. extended bycom.ibm.websphere.logging.hpel.reader.RepositoryReaderImpl
All implemented interfaces:
RepositoryReader

  1. public class RepositoryReaderImpl
  2. extends java.lang.Object
  3. implements RepositoryReader
Implementation of the RepositoryReader providing access to a local HPEL repository.

Constructor Summary

Constructor and Description
RepositoryReaderImpl(java.lang.String directory)
creates RepositoryReader instance working on the binary log set.
RepositoryReaderImpl(java.lang.String logDirectory,java.lang.String traceDirectory)
Creates RepositoryReader instance working on the binary log set and trace log set.

Method Summary

Modifier and Type Method and Description
  1. static
  2. boolean
containsLogFiles(java.io.File location)
checks if specified location contains log files.
  1. ServerInstanceLogRecordList
getLogListForCurrentServerInstance()
  1. ServerInstanceLogRecordList
getLogListForServerInstance(java.util.Date time)
  1. ServerInstanceLogRecordList
getLogListForServerInstance(java.util.Date time,int threadID)
  1. ServerInstanceLogRecordList
getLogListForServerInstance(java.util.Date time,java.util.logging.Level minLevel,java.util.logging.Level maxLevel)
  1. ServerInstanceLogRecordList
getLogListForServerInstance(java.util.Date time,LogQueryBean query)
  1. ServerInstanceLogRecordList
getLogListForServerInstance(java.util.Date time,LogRecordFilter filter)
returns log records from the binary repository which satisfy condition of the filter as specified by the parameter.
  1. ServerInstanceLogRecordList
getLogListForServerInstance(java.util.Date time,LogRecordHeaderFilter filter)
returns log records from the binary repository which satisfy condition of the filter as specified by the parameter.
  1. ServerInstanceLogRecordList
getLogListForServerInstance(RepositoryPointer after)
  1. ServerInstanceLogRecordList
getLogListForServerInstance(RepositoryPointer after,int threadID)
  1. ServerInstanceLogRecordList
getLogListForServerInstance(RepositoryPointer after,java.util.logging.Level minLevel,java.util.logging.Level maxLevel)
  1. ServerInstanceLogRecordList
getLogListForServerInstance(RepositoryPointer after,LogQueryBean query)
  1. ServerInstanceLogRecordList
getLogListForServerInstance(RepositoryPointer after,LogRecordFilter filter)
returns log records from the binary repository that are beyond a given repository location and satisfies the filter criteria as specified by the parameters.
  1. ServerInstanceLogRecordList
getLogListForServerInstance(RepositoryPointer after,LogRecordHeaderFilter filter)
returns log records from the binary repository that are beyond a given repository location and satisfies the filter criteria as specified by the parameters.
  1. java.lang.Iterable<ServerInstanceLogRecordList>
getLogLists()
returns log records from the binary repository
  1. java.lang.Iterable<ServerInstanceLogRecordList>
getLogLists(java.util.Date minTime,java.util.Date maxTime)
returns log records from the binary repository that are between 2 dates (inclusive)
  1. java.lang.Iterable<ServerInstanceLogRecordList>
getLogLists(java.util.Date beginTime,java.util.Date endTime,LogRecordFilter filter)
returns log records from the binary repository that are within the date range and which satisfy condition of the filter as specified by the parameters.
  1. java.lang.Iterable<ServerInstanceLogRecordList>
getLogLists(java.util.Date beginTime,java.util.Date endTime,LogRecordHeaderFilter filter)
returns log records from the binary repository that are within the date range and which satisfy condition of the filter as specified by the parameters.
  1. java.lang.Iterable<ServerInstanceLogRecordList>
getLogLists(int minLevel,int maxLevel)
returns log records from the binary repository that are within the level range as specified by the parameters.
  1. java.lang.Iterable<ServerInstanceLogRecordList>
getLogLists(java.util.logging.Level minLevel,java.util.logging.Level maxLevel)
returns log records from the binary repository beyond the given repository pointer and within the level range as specified by the parameters.
  1. java.lang.Iterable<ServerInstanceLogRecordList>
getLogLists(LogQueryBean query)
  1. java.lang.Iterable<ServerInstanceLogRecordList>
getLogLists(RepositoryPointer after)
returns log records from the binary repository that are within the date range and which satisfy condition of the filter as specified by the parameters.
  1. java.lang.Iterable<ServerInstanceLogRecordList>
getLogLists(RepositoryPointer after,java.util.Date maxTime)
returns log records from the binary repository that are after a given location and less than or equal to a given date Callers would have to invoke RepositoryLogRecordHeader.getRepositoryPointer() to obtain the RepositoryPointer of the last record read.
  1. java.lang.Iterable<ServerInstanceLogRecordList>
getLogLists(RepositoryPointer after,java.util.Date endTime,LogRecordFilter filter)
returns log records from the binary repository that are beyond a given repository location, occured before a given time, and meet a filter condition as specified by the parameters.
  1. java.lang.Iterable<ServerInstanceLogRecordList>
getLogLists(RepositoryPointer after,java.util.Date endTime,LogRecordHeaderFilter filter)
returns log records from the binary repository that are beyond a given repository location, occured before a given time, and meet a filter condition as specified by the parameters.
  1. java.lang.Iterable<ServerInstanceLogRecordList>
getLogLists(RepositoryPointer after,int minLevel,int maxLevel)
returns log records from the binary repository beyond the given repository pointer and within the level range as specified by the parameters.
  1. java.lang.Iterable<ServerInstanceLogRecordList>
getLogLists(RepositoryPointer after,java.util.logging.Level minLevel,java.util.logging.Level maxLevel)
returns log records from the binary repository beyond the given repository pointer and within the level range as specified by the parameters.
  1. java.lang.Iterable<ServerInstanceLogRecordList>
getLogLists(RepositoryPointer after,LogQueryBean query)
  1. java.lang.String
getLogLocation()
Returns log directory used by this reader.
  1. java.lang.String
getTraceLocation()
Returns trace directory used by this reader.
  1. static
  2. java.io.File[]
listRepositories(java.io.File parent)
list subdirectories containing repository files.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RepositoryReaderImpl

  1. public RepositoryReaderImpl(java.lang.String directory)
creates RepositoryReader instance working on the binary log set.
Parameters:
directory - containing log and/or trace files.

RepositoryReaderImpl

  1. public RepositoryReaderImpl(java.lang.String logDirectory,
  2. java.lang.String traceDirectory)
Creates RepositoryReader instance working on the binary log set and trace log set. This allows for a merging of repositories in directories which may not be adjacent.
Parameters:
logDirectory - containing log files. If this is null, then use trace only
traceDirectory - containing log files. If this is null, then use log only
Throws:
java.lang.IllegalArgumentException - if both logDirectory and traceDirectory are null.

Method Detail

getLogLocation

  1. public java.lang.String getLogLocation( )
Returns log directory used by this reader.
Returns:
absolute path to log directory.

getTraceLocation

  1. public java.lang.String getTraceLocation( )
Returns trace directory used by this reader.
Returns:
absolute path to trace directory.

containsLogFiles

  1. public static boolean containsLogFiles( java.io.File location)
checks if specified location contains log files.
Parameters:
location - to check.
Returns:
true if the directory itself or known subdirectories contain log files.

listRepositories

  1. public static java.io.File[] listRepositories( java.io.File parent)
list subdirectories containing repository files.
Parameters:
parent - the directory to check subdirectories in.
Returns:
list of subdirectory names containing repository files.

getLogLists

  1. public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists( )
returns log records from the binary repository
Specified by:
Returns:
the iterable instance of a list of log records If no records are available, the iterable has no entries

getLogLists

  1. public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists( RepositoryPointer after)
returns log records from the binary repository that are within the date range and which satisfy condition of the filter as specified by the parameters.
Specified by:
Parameters:
after - pointer to the a repository location where the query should start. Only includes records after this point
Returns:
the iterable instance of a list of log records within a process that are within the parameter range and satisfy the condition. If no records exist after the location, an Iterable is returned with no entries

getLogLists

  1. public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists( java.util.Date beginTime,
  2. java.util.Date endTime,
  3. LogRecordHeaderFilter filter)
returns log records from the binary repository that are within the date range and which satisfy condition of the filter as specified by the parameters.
Parameters:
beginTime - the minimum Date value that the returned records can have
endTime - the maximum Date value that the returned records can have
filter - an instance implementing LogRecordHeaderFilter interface to verify one record at a time.
Returns:
the iterable instance of a list of log records within a process that are within the parameter range and satisfy the condition. If no records meet the criteria, an Iterable is returned with no entries

getLogLists

  1. public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists( RepositoryPointer after,
  2. java.util.Date endTime,
  3. LogRecordHeaderFilter filter)
returns log records from the binary repository that are beyond a given repository location, occured before a given time, and meet a filter condition as specified by the parameters. Callers would have to invoke RepositoryLogRecordHeader.getRepositoryPointer() to obtain the RepositoryPointer of the last record read.
Parameters:
after - RepositoryPointer of the last read log record.
endTime - the maximum Date value that the returned records can have
filter - an instance implementing LogRecordHeaderFilter interface to verify one record at a time.
Returns:
the iterable instance of a list of log records within a process that are within the parameter range and satisfy the condition. If no records meet the criteria, an Iterable is returned with no entries

getLogLists

  1. public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists( java.util.Date beginTime,
  2. java.util.Date endTime,
  3. LogRecordFilter filter)
returns log records from the binary repository that are within the date range and which satisfy condition of the filter as specified by the parameters.
Parameters:
beginTime - the minimum Date value that the returned records can have
endTime - the maximum Date value that the returned records can have
filter - an instance implementing LogRecordFilter interface to verify one record at a time.
Returns:
the iterable instance of a list of log records within a process that are within the parameter range and satisfy the condition. If no records meet the criteria, an Iterable is returned with no entries

getLogLists

  1. public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists( RepositoryPointer after,
  2. java.util.Date endTime,
  3. LogRecordFilter filter)
returns log records from the binary repository that are beyond a given repository location, occured before a given time, and meet a filter condition as specified by the parameters. Callers would have to invoke RepositoryLogRecordHeader.getRepositoryPointer() to obtain the RepositoryPointer of the last record read.
Parameters:
after - RepositoryPointer of the last read log record.
endTime - the maximum Date value that the returned records can have
filter - an instance implementing LogRecordFilter interface to verify one record at a time.
Returns:
the iterable instance of a list of log records within a process that are within the parameter range and satisfy the condition. If no records meet the criteria, an Iterable is returned with no entries

getLogLists

  1. public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists( int minLevel,
  2. int maxLevel)
returns log records from the binary repository that are within the level range as specified by the parameters.
Parameters:
minLevel - integer value of the minimum Level that the returned records need to match
maxLevel - integer value of the maximum Level that the returned records need to match
Returns:
the iterable instance of a list of log records within a process that are within the parameter range If no records meet the criteria, an Iterable is returned with no entries

getLogLists

  1. public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists( RepositoryPointer after,
  2. int minLevel,
  3. int maxLevel)
returns log records from the binary repository beyond the given repository pointer and within the level range as specified by the parameters. Callers would have to invoke RepositoryLogRecordHeader.getRepositoryPointer() to obtain the RepositoryPointer of the last record read.
Parameters:
after - RepositoryPointer of the last read log record.
minLevel - integer value of the minimum Level that the returned records need to match
maxLevel - integer value of the maximum Level that the returned records need to match
Returns:
the iterable instance of a list of log records within a process that are within the parameter range If no records meet the criteria, an Iterable is returned with no entries

getLogLists

  1. public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists( java.util.logging.Level minLevel,
  2. java.util.logging.Level maxLevel)
returns log records from the binary repository beyond the given repository pointer and within the level range as specified by the parameters. Callers would have to invoke RepositoryLogRecordHeader.getRepositoryPointer() to obtain the RepositoryPointer of the last record read.
Specified by:
Parameters:
minLevel - integer value of the minimum Level that the returned records need to match
maxLevel - integer value of the maximum Level that the returned records need to match
Returns:
the iterable instance of a list of log records within a process that are within the parameter range If no records meet the criteria, an Iterable is returned with no entries

getLogLists

  1. public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists( RepositoryPointer after,
  2. java.util.logging.Level minLevel,
  3. java.util.logging.Level maxLevel)
returns log records from the binary repository beyond the given repository pointer and within the level range as specified by the parameters. Callers would have to invoke RepositoryLogRecordHeader.getRepositoryPointer() to obtain the RepositoryPointer of the last record read.
Specified by:
Parameters:
after - RepositoryPointer of the last read log record.
minLevel - Level value of the minimum Level that the returned records need to match
maxLevel - Level value of the maximum Level that the returned records need to match
Returns:
the iterable instance of a list of log records within a process that are within the parameter range If no records meet the criteria, an Iterable is returned with no entries

getLogLists

  1. public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists( java.util.Date minTime,
  2. java.util.Date maxTime)
returns log records from the binary repository that are between 2 dates (inclusive)
Specified by:
Parameters:
minTime - the minimum Date value that the returned records can have
maxTime - the maximum Date value that the returned records can have
Returns:
the iterable instance of a list of log records within a process that are within the parameter range and satisfy the condition. If no records meet the criteria, an Iterable is returned with no entries

getLogLists

  1. public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists( RepositoryPointer after,
  2. java.util.Date maxTime)
returns log records from the binary repository that are after a given location and less than or equal to a given date Callers would have to invoke RepositoryLogRecordHeader.getRepositoryPointer() to obtain the RepositoryPointer of the last record read.
Specified by:
Parameters:
after - RepositoryPointer of the last read log record.
maxTime - the maximum Date value that the returned records can have
Returns:
the iterable instance of a list of log records within a process that are within the parameter range and satisfy the condition. If no records meet the criteria, an Iterable is returned with no entries

getLogLists

  1. public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists( LogQueryBean query)
Description copied from interface: RepositoryReader
returns log records from the repository according to the criteria specified by the log query bean.
Specified by:
Parameters:
query - LogQueryBean instance representing set of criteria each of which need to be met by the return records.
Returns:
the iterable instance of a list of log records within a process that are within the parameter range If no records meet the criteria, an Iterable is returned with no entries

getLogLists

  1. public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists( RepositoryPointer after,
  2. LogQueryBean query)
Description copied from interface: RepositoryReader
returns log records from the repository that are beyond a given repository location, according to the criteria specified by the log query bean.
Specified by:
Parameters:
after - pointer to a record the list will start after
query - LogQueryBean instance representing set of criteria each of which need to be met by the return records.
Returns:
the iterable instance of a list of log records within a process that are within the parameter range If no records meet the criteria, an Iterable is returned with no entries

getLogListForCurrentServerInstance

  1. public ServerInstanceLogRecordList getLogListForCurrentServerInstance( )
Description copied from interface: RepositoryReader
returns log records from the repository that were created since the last server startup.
Specified by:
Returns:
the iterable list of log records If no records meet the criteria, an Iterable is returned with no entries

getLogListForServerInstance

  1. public ServerInstanceLogRecordList getLogListForServerInstance( java.util.Date time)
Description copied from interface: RepositoryReader
returns log records from the repository of a server instance running at the time specified.
Specified by:
Parameters:
time - Date value used to determine the server instance where the server start time occurs before this value and the server stop time occurs after this value
Returns:
the iterable list of log records If no records meet the criteria, a list is returned with a null properties object and a null record list

getLogListForServerInstance

  1. public ServerInstanceLogRecordList getLogListForServerInstance( RepositoryPointer after)
Description copied from interface: RepositoryReader
returns log records from the repository that are beyond a given repository location as specified. Callers need to invoke RepositoryLogRecordHeader.getRepositoryPointer() to obtain the RepositoryPointer for a particular log record. The returned logs will be from one server instance.
Specified by:
Parameters:
after - pointer to a record the list will start after
Returns:
the iterable list of log records If no records meet the criteria, the list is empty.

getLogListForServerInstance

  1. public ServerInstanceLogRecordList getLogListForServerInstance( java.util.Date time,
  2. LogRecordHeaderFilter filter)
returns log records from the binary repository which satisfy condition of the filter as specified by the parameter. The returned logs will be from the same server instance. The server instance will be determined by the time as specified by the parameter.
Parameters:
time - the Date time value used to determine the server instance where the server start time occurs before this value and the server stop time occurs after this value
filter - an instance implementing LogRecordHeaderFilter interface to verify one record at a time.
Returns:
the iterable list of log records

getLogListForServerInstance

  1. public ServerInstanceLogRecordList getLogListForServerInstance( RepositoryPointer after,
  2. LogRecordHeaderFilter filter)
returns log records from the binary repository that are beyond a given repository location and satisfies the filter criteria as specified by the parameters. Callers would have to invoke RepositoryLogRecordHeader.getRepositoryPointer() to obtain the RepositoryPointer of the last record read. The returned logs will be from the same server instance.
Parameters:
after - RepositoryPointer of the last read log record.
filter - an instance implementing LogRecordHeaderFilter interface to verify one record at a time.
Returns:
the iterable list of log records

getLogListForServerInstance

  1. public ServerInstanceLogRecordList getLogListForServerInstance( java.util.Date time,
  2. LogRecordFilter filter)
returns log records from the binary repository which satisfy condition of the filter as specified by the parameter. The returned logs will be from the same server instance. The server instance will be determined by the time as specified by the parameter.
Parameters:
time - the Date time value used to determine the server instance where the server start time occurs before this value and the server stop time occurs after this value
filter - an instance implementing LogRecordFilter interface to verify one record at a time.
Returns:
the iterable list of log records

getLogListForServerInstance

  1. public ServerInstanceLogRecordList getLogListForServerInstance( RepositoryPointer after,
  2. LogRecordFilter filter)
returns log records from the binary repository that are beyond a given repository location and satisfies the filter criteria as specified by the parameters. Callers would have to invoke RepositoryLogRecordHeader.getRepositoryPointer() to obtain the RepositoryPointer of the last record read. The returned logs will be from the same server instance.
Parameters:
after - RepositoryPointer of the last read log record.
filter - an instance implementing LogRecordFilter interface to verify one record at a time.
Returns:
the iterable list of log records

getLogListForServerInstance

  1. public ServerInstanceLogRecordList getLogListForServerInstance( java.util.Date time,
  2. java.util.logging.Level minLevel,
  3. java.util.logging.Level maxLevel)
Description copied from interface: RepositoryReader
returns log records from the repository of a server instance running at a specified time, within the level range as specified.
Specified by:
Parameters:
time - Date value used to determine the server instance where the server start time occurs before this value and the server stop time occurs after this value
minLevel - minimum Level that will be included in the returned list
maxLevel - maximum Level that will be included in the returned list
Returns:
the iterable list of log records If no records meet the criteria, the list is empty.

getLogListForServerInstance

  1. public ServerInstanceLogRecordList getLogListForServerInstance( RepositoryPointer after,
  2. java.util.logging.Level minLevel,
  3. java.util.logging.Level maxLevel)
Description copied from interface: RepositoryReader
returns log records from the repository that are beyond a given repository location and within the level range as specified. Callers need to invoke RepositoryLogRecordHeader.getRepositoryPointer() to obtain the RepositoryPointer for a particular log record. The returned logs will be from one server instance.
Specified by:
Parameters:
after - pointer to a record the list will start after
minLevel - minimum Level that will be included in the returned list
maxLevel - maximum Level that will be included in the returned list
Returns:
the iterable list of log records If no records meet the criteria, the list is empty.

getLogListForServerInstance

  1. public ServerInstanceLogRecordList getLogListForServerInstance( java.util.Date time,
  2. int threadID)
Description copied from interface: RepositoryReader
returns log records from the repository of a server instance running at a specified time created by the given thread.
Specified by:
Parameters:
time - Date value used to determine the server instance where the server start time occurs before this value and the server stop time occurs after this value
threadID - ID of the thread that the returned records will match
Returns:
the iterable list of log records If no records meet the criteria, the list is empty.

getLogListForServerInstance

  1. public ServerInstanceLogRecordList getLogListForServerInstance( RepositoryPointer after,
  2. int threadID)
Description copied from interface: RepositoryReader
returns log records from the repository that are beyond a given repository location and created by a given thread as specified. Callers need to invoke RepositoryLogRecordHeader.getRepositoryPointer() to obtain the RepositoryPointer for a particular log record. The returned logs will be from one server instance.
Specified by:
Parameters:
after - pointer to a record the list will start after
threadID - ID of the thread that the returned records will match
Returns:
the iterable list of log records If no records meet the criteria, the list is empty.

getLogListForServerInstance

  1. public ServerInstanceLogRecordList getLogListForServerInstance( java.util.Date time,
  2. LogQueryBean query)
Description copied from interface: RepositoryReader
returns log records from the repository of a server instance running at a specified time, according to the criteria specified by the log query bean.
Specified by:
Parameters:
time - Date value used to determine the server instance where the server start time occurs before this value and the server stop time occurs after this value
query - LogQueryBean instance representing set of criteria each of which need to be met by the return records.
Returns:
the iterable list of log records If no records meet the criteria, the list is empty.
See Also:

getLogListForServerInstance

  1. public ServerInstanceLogRecordList getLogListForServerInstance( RepositoryPointer after,
  2. LogQueryBean query)
Description copied from interface: RepositoryReader
returns log records from the repository for one server instance that are beyond a given repository location, according to the criteria specified by the log query bean.
Specified by:
Parameters:
after - pointer to a record the list will start after
query - LogQueryBean instance representing set of criteria each of which need to be met by the return records.
Returns:
the iterable list of log records If no records meet the criteria, the list is empty.
See Also: