public class RepositoryReaderImpl extends java.lang.Object implements RepositoryReader
RepositoryReader
providing access to a local HPEL repository.Constructor and Description |
---|
RepositoryReaderImpl(java.io.File directory)
creates RepositoryReader instance working on the binary log set.
|
RepositoryReaderImpl(java.io.File logLocation,
java.io.File traceLocation)
Creates RepositoryReader instance working on the binary log set and trace log set.
|
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.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
containsLogFiles(java.io.File location)
checks if specified location contains log files.
|
java.io.File |
generateLogOutput(LogQueryBean logQueryBean,
java.lang.String outputFileName,
java.lang.String formatter) |
ServerInstanceLogRecordList |
getLogListForCurrentServerInstance()
returns log records from the repository that were created since the last
server startup.
|
ServerInstanceLogRecordList |
getLogListForServerInstance(java.util.Date time)
returns log records from the repository of a server instance running
at the time specified.
|
ServerInstanceLogRecordList |
getLogListForServerInstance(java.util.Date time,
int threadID)
returns log records from the repository of a server instance running
at a specified time created by the given thread.
|
ServerInstanceLogRecordList |
getLogListForServerInstance(java.util.Date time,
java.util.logging.Level minLevel,
java.util.logging.Level maxLevel)
returns log records from the repository of a server instance running
at a specified time, within the level range as specified.
|
ServerInstanceLogRecordList |
getLogListForServerInstance(java.util.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.
|
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.
|
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.
|
ServerInstanceLogRecordList |
getLogListForServerInstance(RepositoryPointer after)
returns log records from the repository that are beyond a given
repository location as specified.
|
ServerInstanceLogRecordList |
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.
|
ServerInstanceLogRecordList |
getLogListForServerInstance(RepositoryPointer after,
java.util.logging.Level minLevel,
java.util.logging.Level maxLevel)
returns log records from the repository that are beyond a given
repository location and within the level range as specified.
|
ServerInstanceLogRecordList |
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.
|
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.
|
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.
|
java.lang.Iterable<ServerInstanceLogRecordList> |
getLogLists()
returns log records from the binary repository
|
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)
|
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.
|
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.
|
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.
|
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.
|
java.lang.Iterable<ServerInstanceLogRecordList> |
getLogLists(LogQueryBean query)
returns log records from the repository according to the criteria specified
by the log query bean.
|
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.
|
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. |
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.
|
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.
|
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.
|
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.
|
java.lang.Iterable<ServerInstanceLogRecordList> |
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.
|
java.lang.String |
getLogLocation()
Returns log directory used by this reader.
|
java.lang.String |
getTraceLocation()
Returns trace directory used by this reader.
|
static java.io.File[] |
listRepositories(java.io.File parent)
list subdirectories containing repository files.
|
public RepositoryReaderImpl(java.lang.String directory)
directory
- or zip file containing log and/or trace files.public RepositoryReaderImpl(java.lang.String logDirectory, java.lang.String traceDirectory)
logDirectory
- containing log files. If this is null, then use trace onlytraceDirectory
- containing log files. If this is null, then use log onlyjava.lang.IllegalArgumentException
- if both logDirectory
and traceDirectory
are null.public RepositoryReaderImpl(java.io.File directory)
directory
- or zip file containing log and/or trace files.public RepositoryReaderImpl(java.io.File logLocation, java.io.File traceLocation)
logLocation
- containing log files. If this is null, then use trace onlytraceLocation
- containing log files. If this is null, then use log onlyjava.lang.IllegalArgumentException
- if both logLocation
and traceLocation
are null.public java.lang.String getLogLocation()
public java.lang.String getTraceLocation()
public static boolean containsLogFiles(java.io.File location)
location
- to check.true
if the directory itself or known subdirectories contain log files.public static java.io.File[] listRepositories(java.io.File parent)
parent
- the directory to check subdirectories in.public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists()
getLogLists
in interface RepositoryReader
public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists(RepositoryPointer after)
getLogLists
in interface RepositoryReader
after
- pointer to the a repository location where the query should start. Only includes records after this pointpublic java.lang.Iterable<ServerInstanceLogRecordList> getLogLists(java.util.Date beginTime, java.util.Date endTime, LogRecordHeaderFilter filter)
beginTime
- the minimum Date
value that the returned records can haveendTime
- the maximum Date
value that the returned records can havefilter
- an instance implementing LogRecordHeaderFilter
interface to verify one record at a time.public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists(RepositoryPointer after, java.util.Date endTime, LogRecordHeaderFilter filter)
RepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer
of the last record read.after
- RepositoryPointer of the last read log record.endTime
- the maximum Date
value that the returned records can havefilter
- an instance implementing LogRecordHeaderFilter
interface to verify one record at a time.public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists(java.util.Date beginTime, java.util.Date endTime, LogRecordFilter filter)
beginTime
- the minimum Date
value that the returned records can haveendTime
- the maximum Date
value that the returned records can havefilter
- an instance implementing LogRecordFilter
interface to verify one record at a time.public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists(RepositoryPointer after, java.util.Date endTime, LogRecordFilter filter)
RepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer
of the last record read.after
- RepositoryPointer of the last read log record.endTime
- the maximum Date
value that the returned records can havefilter
- an instance implementing LogRecordFilter
interface to verify one record at a time.public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists(int minLevel, int maxLevel)
minLevel
- integer value of the minimum Level
that the returned records need to matchmaxLevel
- integer value of the maximum Level
that the returned records need to matchpublic java.lang.Iterable<ServerInstanceLogRecordList> getLogLists(RepositoryPointer after, int minLevel, int maxLevel)
RepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer of the last record read.after
- RepositoryPointer of the last read log record.minLevel
- integer value of the minimum Level
that the returned records need to matchmaxLevel
- integer value of the maximum Level
that the returned records need to matchpublic java.lang.Iterable<ServerInstanceLogRecordList> getLogLists(java.util.logging.Level minLevel, java.util.logging.Level maxLevel)
RepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer of the last record read.getLogLists
in interface RepositoryReader
minLevel
- integer value of the minimum Level
that the returned records need to matchmaxLevel
- integer value of the maximum Level
that the returned records need to matchpublic java.lang.Iterable<ServerInstanceLogRecordList> getLogLists(RepositoryPointer after, java.util.logging.Level minLevel, java.util.logging.Level maxLevel)
RepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer of the last record read.getLogLists
in interface RepositoryReader
after
- RepositoryPointer of the last read log record.minLevel
- Level value of the minimum Level
that the returned records need to matchmaxLevel
- Level value of the maximum Level
that the returned records need to matchpublic java.lang.Iterable<ServerInstanceLogRecordList> getLogLists(java.util.Date minTime, java.util.Date maxTime)
getLogLists
in interface RepositoryReader
minTime
- the minimum Date
value that the returned records can havemaxTime
- the maximum Date
value that the returned records can havepublic java.lang.Iterable<ServerInstanceLogRecordList> getLogLists(RepositoryPointer after, java.util.Date maxTime)
RepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer of the last record read.getLogLists
in interface RepositoryReader
after
- RepositoryPointer of the last read log record.maxTime
- the maximum Date
value that the returned records can havepublic java.lang.Iterable<ServerInstanceLogRecordList> getLogLists(LogQueryBean query)
RepositoryReader
getLogLists
in interface RepositoryReader
query
- LogQueryBean
instance representing set of criteria
each of which need to be met by the return records.public java.lang.Iterable<ServerInstanceLogRecordList> getLogLists(RepositoryPointer after, LogQueryBean query)
RepositoryReader
getLogLists
in interface RepositoryReader
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.public ServerInstanceLogRecordList getLogListForCurrentServerInstance()
RepositoryReader
getLogListForCurrentServerInstance
in interface RepositoryReader
public ServerInstanceLogRecordList getLogListForServerInstance(java.util.Date time)
RepositoryReader
getLogListForServerInstance
in interface RepositoryReader
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 valuepublic ServerInstanceLogRecordList getLogListForServerInstance(RepositoryPointer after)
RepositoryReader
RepositoryLogRecordHeader.getRepositoryPointer()
to obtain the
RepositoryPointer for a particular log record. The returned logs will
be from one server instance.getLogListForServerInstance
in interface RepositoryReader
after
- pointer to a record the list will start afterpublic ServerInstanceLogRecordList getLogListForServerInstance(java.util.Date time, LogRecordHeaderFilter filter)
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 valuefilter
- an instance implementing LogRecordHeaderFilter
interface to verify one record at a time.public ServerInstanceLogRecordList getLogListForServerInstance(RepositoryPointer after, LogRecordHeaderFilter filter)
RepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer
of the last record read. The returned logs will be from the same server instance.after
- RepositoryPointer of the last read log record.filter
- an instance implementing LogRecordHeaderFilter
interface to verify one record at a time.public ServerInstanceLogRecordList getLogListForServerInstance(java.util.Date time, LogRecordFilter filter)
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 valuefilter
- an instance implementing LogRecordFilter
interface to verify one record at a time.public ServerInstanceLogRecordList getLogListForServerInstance(RepositoryPointer after, LogRecordFilter filter)
RepositoryLogRecordHeader.getRepositoryPointer()
to obtain the RepositoryPointer
of the last record read. The returned logs will be from the same server instance.after
- RepositoryPointer of the last read log record.filter
- an instance implementing LogRecordFilter
interface to verify one record at a time.public ServerInstanceLogRecordList getLogListForServerInstance(java.util.Date time, java.util.logging.Level minLevel, java.util.logging.Level maxLevel)
RepositoryReader
getLogListForServerInstance
in interface RepositoryReader
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
- minimum Level
that will be included in the
returned listmaxLevel
- maximum Level
that will be included in the
returned listpublic ServerInstanceLogRecordList getLogListForServerInstance(RepositoryPointer after, java.util.logging.Level minLevel, java.util.logging.Level maxLevel)
RepositoryReader
RepositoryLogRecordHeader.getRepositoryPointer()
to obtain the
RepositoryPointer for a particular log record. The returned logs will
be from one server instance.getLogListForServerInstance
in interface RepositoryReader
after
- pointer to a record the list will start afterminLevel
- minimum Level
that will be included in the
returned listmaxLevel
- maximum Level
that will be included in the
returned listpublic ServerInstanceLogRecordList getLogListForServerInstance(java.util.Date time, int threadID)
RepositoryReader
getLogListForServerInstance
in interface RepositoryReader
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 matchpublic ServerInstanceLogRecordList getLogListForServerInstance(RepositoryPointer after, int threadID)
RepositoryReader
RepositoryLogRecordHeader.getRepositoryPointer()
to obtain the
RepositoryPointer for a particular log record. The returned logs will
be from one server instance.getLogListForServerInstance
in interface RepositoryReader
after
- pointer to a record the list will start afterthreadID
- ID of the thread that the returned records will matchpublic ServerInstanceLogRecordList getLogListForServerInstance(java.util.Date time, LogQueryBean query)
RepositoryReader
getLogListForServerInstance
in interface RepositoryReader
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.LogQueryBean
public ServerInstanceLogRecordList getLogListForServerInstance(RepositoryPointer after, LogQueryBean query)
RepositoryReader
getLogListForServerInstance
in interface RepositoryReader
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.LogQueryBean
public java.io.File generateLogOutput(LogQueryBean logQueryBean, java.lang.String outputFileName, java.lang.String formatter)
generateLogOutput
in interface RepositoryReader