Class MultipleFileLogReader
java.lang.Object
org.eclipse.rdf4j.common.logging.base.AbstractLogReader
org.eclipse.rdf4j.common.logging.file.logback.MultipleFileLogReader
Date range-enabled wrapper for FileLogReader. Reads multiple log files chunked by dates as a single log.
- Author:
- alex
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Custom filename filter -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroy the log reader and release all used resources.Return the end dateMax (latest) available date of the log records.Min (earliest) available date of the log records.Return the start dateboolean
hasNext()
void
init()
Initialize the log reader.boolean
Check if more records are available after limit is reached.next()
void
setAppender
(ch.qos.logback.core.Appender<?> appender) Logging appender associated with this reader.void
setEndDate
(Date endDate) Set the end datevoid
setStartDate
(Date startDate) Set start dateboolean
Test if this LogReader implementation supports date-based records filtering.Methods inherited from class org.eclipse.rdf4j.common.logging.base.AbstractLogReader
getAppender, getLevel, getLimit, getOffset, getThread, getThreadNames, remove, setLevel, setLimit, setOffset, setThread, supportsLevelFilter, supportsThreadFilter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
MultipleFileLogReader
public MultipleFileLogReader()
-
-
Method Details
-
supportsDateRanges
public boolean supportsDateRanges()Description copied from interface:LogReader
Test if this LogReader implementation supports date-based records filtering.- Specified by:
supportsDateRanges
in interfaceLogReader
- Overrides:
supportsDateRanges
in classAbstractLogReader
- Returns:
- true if date filtering is supported
-
setAppender
public void setAppender(ch.qos.logback.core.Appender<?> appender) Description copied from interface:LogReader
Logging appender associated with this reader.- Specified by:
setAppender
in interfaceLogReader
- Overrides:
setAppender
in classAbstractLogReader
- Parameters:
appender
- logging appender associated with this reader
-
init
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator<LogRecord>
- Specified by:
hasNext
in classAbstractLogReader
-
isMoreAvailable
public boolean isMoreAvailable()Description copied from interface:LogReader
Check if more records are available after limit is reached.- Returns:
- true if more records are available
-
next
-
destroy
Description copied from interface:LogReader
Destroy the log reader and release all used resources.- Throws:
IOException
-
getStartDate
Return the start date- Specified by:
getStartDate
in interfaceLogReader
- Overrides:
getStartDate
in classAbstractLogReader
- Returns:
- start date.
-
setStartDate
Set start date- Specified by:
setStartDate
in interfaceLogReader
- Overrides:
setStartDate
in classAbstractLogReader
- Parameters:
startDate
- The startDate to set.
-
getEndDate
Return the end date- Specified by:
getEndDate
in interfaceLogReader
- Overrides:
getEndDate
in classAbstractLogReader
- Returns:
- end date
-
setEndDate
Set the end date- Specified by:
setEndDate
in interfaceLogReader
- Overrides:
setEndDate
in classAbstractLogReader
- Parameters:
endDate
- The endDate to set.
-
getMaxDate
Description copied from interface:LogReader
Max (latest) available date of the log records.- Specified by:
getMaxDate
in interfaceLogReader
- Overrides:
getMaxDate
in classAbstractLogReader
- Returns:
- maximum date
-
getMinDate
Description copied from interface:LogReader
Min (earliest) available date of the log records.- Specified by:
getMinDate
in interfaceLogReader
- Overrides:
getMinDate
in classAbstractLogReader
- Returns:
- minimum date
-