Class RepositoryReaderImpl
java.lang.Object
com.ibm.websphere.logging.hpel.reader.RepositoryReaderImpl
- All Implemented Interfaces:
RepositoryReader
Implementation of the
RepositoryReader
providing access to a local HPEL repository.-
Constructor Summary
ConstructorsConstructorDescriptionRepositoryReaderImpl
(File directory) creates RepositoryReader instance working on the binary log set.RepositoryReaderImpl
(File logLocation, File traceLocation) Creates RepositoryReader instance working on the binary log set and trace log set.RepositoryReaderImpl
(String directory) creates RepositoryReader instance working on the binary log set.RepositoryReaderImpl
(String logDirectory, String traceDirectory) Creates RepositoryReader instance working on the binary log set and trace log set. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
containsLogFiles
(File location) checks if specified location contains log files.returns log records from the repository that were created since the last server startup.returns log records from the repository that are beyond a given repository location as specified.getLogListForServerInstance
(RepositoryPointer after, int threadID) returns log records from the repository that are beyond a given repository location and created by a given thread as specified.getLogListForServerInstance
(RepositoryPointer after, LogQueryBean query) 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.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.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.getLogListForServerInstance
(RepositoryPointer after, Level minLevel, Level maxLevel) returns log records from the repository that are beyond a given repository location and within the level range as specified.returns log records from the repository of a server instance running at the time specified.getLogListForServerInstance
(Date time, int threadID) returns log records from the repository of a server instance running at a specified time created by the given thread.getLogListForServerInstance
(Date time, LogQueryBean query) 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.getLogListForServerInstance
(Date time, LogRecordFilter filter) returns log records from the binary repository which satisfy condition of the filter as specified by the parameter.getLogListForServerInstance
(Date time, LogRecordHeaderFilter filter) returns log records from the binary repository which satisfy condition of the filter as specified by the parameter.getLogListForServerInstance
(Date time, Level minLevel, Level maxLevel) returns log records from the repository of a server instance running at a specified time, within the level range as specified.returns log records from the binary repositorygetLogLists
(int minLevel, int maxLevel) returns log records from the binary repository that are within the level range as specified by the parameters.getLogLists
(LogQueryBean query) returns log records from the repository according to the criteria specified by the log query bean.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.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.getLogLists
(RepositoryPointer after, LogQueryBean query) returns log records from the repository that are beyond a given repository location, according to the criteria specified by the log query bean.getLogLists
(RepositoryPointer after, 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 invokeRepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer of the last record read.getLogLists
(RepositoryPointer after, 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.getLogLists
(RepositoryPointer after, 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.getLogLists
(RepositoryPointer after, Level minLevel, Level maxLevel) returns log records from the binary repository beyond the given repository pointer and within the level range as specified by the parameters.getLogLists
(Date minTime, Date maxTime) returns log records from the binary repository that are between 2 dates (inclusive)getLogLists
(Date beginTime, 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.getLogLists
(Date beginTime, 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.getLogLists
(Level minLevel, Level maxLevel) returns log records from the binary repository beyond the given repository pointer and within the level range as specified by the parameters.Returns log directory used by this reader.Returns trace directory used by this reader.static File[]
listRepositories
(File parent) list subdirectories containing repository files.
-
Constructor Details
-
RepositoryReaderImpl
creates RepositoryReader instance working on the binary log set.- Parameters:
directory
- or zip file containing log and/or trace files.
-
RepositoryReaderImpl
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 onlytraceDirectory
- containing log files. If this is null, then use log only- Throws:
IllegalArgumentException
- if bothlogDirectory
andtraceDirectory
are null.
-
RepositoryReaderImpl
creates RepositoryReader instance working on the binary log set.- Parameters:
directory
- or zip file containing log and/or trace files.
-
RepositoryReaderImpl
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:
logLocation
- containing log files. If this is null, then use trace onlytraceLocation
- containing log files. If this is null, then use log only- Throws:
IllegalArgumentException
- if bothlogLocation
andtraceLocation
are null.
-
-
Method Details
-
getLogLocation
Returns log directory used by this reader.- Returns:
- absolute path to log directory.
-
getTraceLocation
Returns trace directory used by this reader.- Returns:
- absolute path to trace directory.
-
containsLogFiles
checks if specified location contains log files.- Parameters:
location
- to check.- Returns:
true
if the directory itself or known subdirectories contain log files.
-
listRepositories
list subdirectories containing repository files.- Parameters:
parent
- the directory to check subdirectories in.- Returns:
- list of subdirectory names containing repository files.
-
getLogLists
returns log records from the binary repository- Specified by:
getLogLists
in interfaceRepositoryReader
- Returns:
- the iterable instance of a list of log records If no records are available, the iterable has no entries
-
getLogLists
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:
getLogLists
in interfaceRepositoryReader
- 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
public Iterable<ServerInstanceLogRecordList> getLogLists(Date beginTime, 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.- Parameters:
beginTime
- the minimumDate
value that the returned records can haveendTime
- the maximumDate
value that the returned records can havefilter
- an instance implementingLogRecordHeaderFilter
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
public Iterable<ServerInstanceLogRecordList> getLogLists(RepositoryPointer after, 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. Callers would have to invokeRepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer of the last record read.- Parameters:
after
- RepositoryPointer of the last read log record.endTime
- the maximumDate
value that the returned records can havefilter
- an instance implementingLogRecordHeaderFilter
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
public Iterable<ServerInstanceLogRecordList> getLogLists(Date beginTime, 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.- Parameters:
beginTime
- the minimumDate
value that the returned records can haveendTime
- the maximumDate
value that the returned records can havefilter
- an instance implementingLogRecordFilter
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
public Iterable<ServerInstanceLogRecordList> getLogLists(RepositoryPointer after, 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. Callers would have to invokeRepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer of the last record read.- Parameters:
after
- RepositoryPointer of the last read log record.endTime
- the maximumDate
value that the returned records can havefilter
- an instance implementingLogRecordFilter
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
returns log records from the binary repository that are within the level range as specified by the parameters.- Parameters:
minLevel
- integer value of the minimumLevel
that the returned records need to matchmaxLevel
- integer value of the maximumLevel
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
public 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. Callers would have to invokeRepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer of the last record read.- Parameters:
after
- RepositoryPointer of the last read log record.minLevel
- integer value of the minimumLevel
that the returned records need to matchmaxLevel
- integer value of the maximumLevel
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
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 invokeRepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer of the last record read.- Specified by:
getLogLists
in interfaceRepositoryReader
- Parameters:
minLevel
- integer value of the minimumLevel
that the returned records need to matchmaxLevel
- integer value of the maximumLevel
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
public Iterable<ServerInstanceLogRecordList> getLogLists(RepositoryPointer after, Level minLevel, 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 invokeRepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer of the last record read.- Specified by:
getLogLists
in interfaceRepositoryReader
- Parameters:
after
- RepositoryPointer of the last read log record.minLevel
- Level value of the minimumLevel
that the returned records need to matchmaxLevel
- Level value of the maximumLevel
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
returns log records from the binary repository that are between 2 dates (inclusive)- Specified by:
getLogLists
in interfaceRepositoryReader
- Parameters:
minTime
- the minimumDate
value that the returned records can havemaxTime
- the maximumDate
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
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 invokeRepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer of the last record read.- Specified by:
getLogLists
in interfaceRepositoryReader
- Parameters:
after
- RepositoryPointer of the last read log record.maxTime
- the maximumDate
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
Description copied from interface:RepositoryReader
returns log records from the repository according to the criteria specified by the log query bean.- Specified by:
getLogLists
in interfaceRepositoryReader
- 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
public Iterable<ServerInstanceLogRecordList> getLogLists(RepositoryPointer after, 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:
getLogLists
in interfaceRepositoryReader
- Parameters:
after
- pointer to a record the list will start afterquery
-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
Description copied from interface:RepositoryReader
returns log records from the repository that were created since the last server startup.- Specified by:
getLogListForCurrentServerInstance
in interfaceRepositoryReader
- Returns:
- the iterable list of log records If no records meet the criteria, an Iterable is returned with no entries
-
getLogListForServerInstance
Description copied from interface:RepositoryReader
returns log records from the repository of a server instance running at the time specified.- Specified by:
getLogListForServerInstance
in interfaceRepositoryReader
- 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
Description copied from interface:RepositoryReader
returns log records from the repository that are beyond a given repository location as specified. Callers need to invokeRepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer for a particular log record. The returned logs will be from one server instance.- Specified by:
getLogListForServerInstance
in interfaceRepositoryReader
- 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
public ServerInstanceLogRecordList getLogListForServerInstance(Date time, 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
- theDate
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 valuefilter
- an instance implementingLogRecordHeaderFilter
interface to verify one record at a time.- Returns:
- the iterable list of log records
-
getLogListForServerInstance
public 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. Callers would have to invokeRepositoryLogRecordHeader.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 implementingLogRecordHeaderFilter
interface to verify one record at a time.- Returns:
- the iterable list of log records
-
getLogListForServerInstance
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
- theDate
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 valuefilter
- an instance implementingLogRecordFilter
interface to verify one record at a time.- Returns:
- the iterable list of log records
-
getLogListForServerInstance
public 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. Callers would have to invokeRepositoryLogRecordHeader.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 implementingLogRecordFilter
interface to verify one record at a time.- Returns:
- the iterable list of log records
-
getLogListForServerInstance
public ServerInstanceLogRecordList getLogListForServerInstance(Date time, Level minLevel, 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:
getLogListForServerInstance
in interfaceRepositoryReader
- 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 valueminLevel
- minimumLevel
that will be included in the returned listmaxLevel
- maximumLevel
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
public ServerInstanceLogRecordList getLogListForServerInstance(RepositoryPointer after, Level minLevel, 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 invokeRepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer for a particular log record. The returned logs will be from one server instance.- Specified by:
getLogListForServerInstance
in interfaceRepositoryReader
- Parameters:
after
- pointer to a record the list will start afterminLevel
- minimumLevel
that will be included in the returned listmaxLevel
- maximumLevel
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
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:
getLogListForServerInstance
in interfaceRepositoryReader
- 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 valuethreadID
- 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
public ServerInstanceLogRecordList getLogListForServerInstance(RepositoryPointer after, 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 invokeRepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer for a particular log record. The returned logs will be from one server instance.- Specified by:
getLogListForServerInstance
in interfaceRepositoryReader
- Parameters:
after
- pointer to a record the list will start afterthreadID
- 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
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:
getLogListForServerInstance
in interfaceRepositoryReader
- 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 valuequery
-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
public ServerInstanceLogRecordList getLogListForServerInstance(RepositoryPointer after, 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:
getLogListForServerInstance
in interfaceRepositoryReader
- Parameters:
after
- pointer to a record the list will start afterquery
-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:
-