com.sap.tc.logging.reader
Class ReadFileSetLog

java.lang.Object
  |
  +--com.sap.tc.logging.ExceptionHandling
        |
        +--com.sap.tc.logging.BaseLog
              |
              +--com.sap.tc.logging.reader.ReadLog
                    |
                    +--com.sap.tc.logging.reader.ReadFileSetLog
All Implemented Interfaces:
java.lang.Cloneable, IBaseLog, IFileSetLog, IObjectInfo, IReadLog
Direct Known Subclasses:
FileReadLog

public abstract class ReadFileSetLog
extends ReadLog
implements IFileSetLog


Field Summary
static int MODE_FILE_SET
           
static int MODE_SINGLE_FILE
           
 
Fields inherited from class com.sap.tc.logging.BaseLog
STATUS_CLOSED, STATUS_INVALID, STATUS_OPENED
 
Constructor Summary
ReadFileSetLog(java.lang.String fileName)
           
ReadFileSetLog(java.lang.String fileName, int size, int limit)
           
 
Method Summary
 java.io.File getFile()
          Gets the current file in rotating file set
 java.io.File getFile(int index)
          Gets the file from rotating fileset on given position (index).
 java.io.File getFileLatest()
          Gets the latest (newest) file from the rotating fileset.
 java.io.File getFilePrime()
          Gets the prime (oldest) file from the rotating fileset.
 int getIndex()
          Gets the current file index in rotating file set
 int getLimit()
          Gets the limit file size used for sequencing on the rotating output file
 int getSize()
          Gets the size of rotating fileset, number of files in fileset.
 boolean isEnd()
           
 boolean isInFileSet()
          Check is the file in rotating file set
 boolean isInFileSetMode()
          Helper method.
 boolean isInSingleFileMode()
          Helper method.
 boolean isStart()
           
 void moveToBOFS()
          Move rotating fileset index to the oldest File in the fileset
 void moveToEOFS()
          Move rotating fileset index to the newest File in the fileset
 void next()
          Move rotating fileset index to next position.
 void previous()
          Move rotating fileset index to previous position.
 void setIndex(int value)
          Sets the current file index in rotating file set
 void setLimit(int value)
          Sets the limit file size used for sequencing on the rotating output file
 void setSize(int value)
          Sets the size of rotating fileset, number of files in fileset.
 
Methods inherited from class com.sap.tc.logging.reader.ReadLog
getBookMark, readNext, readPrevious, setBookMark
 
Methods inherited from class com.sap.tc.logging.BaseLog
addFilter, close, getDescription, getEncoding, getFilter, getFilters, getFooter, getFormatter, getHeader, getMode, getName, getPattern, getSource, getVerInUse, isClosed, isOpened, open, removeFilter, removeFilters, setDescription, setEncoding, setFormatter, setMode, setName, setPattern, setSource, status
 
Methods inherited from class com.sap.tc.logging.ExceptionHandling
getException, getExceptions, handleException, handleException, resetException, throwException
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sap.tc.logging.interfaces.IReadLog
find, getMode, isBOF, isEOF, moveToBOF, moveToEOF, readNext, readPrevious, search, seek, setMode
 
Methods inherited from interface com.sap.tc.logging.interfaces.IBaseLog
addFilter, close, getEncoding, getFilter, getFilters, getFooter, getFormatter, getHeader, getPattern, getSource, isClosed, isOpened, open, removeFilter, removeFilters, setEncoding, setFormatter, setPattern, setSource, status
 
Methods inherited from interface com.sap.tc.logging.interfaces.IObjectInfo
getDescription, getName, getVerInUse
 

Field Detail

MODE_SINGLE_FILE

public static final int MODE_SINGLE_FILE

MODE_FILE_SET

public static final int MODE_FILE_SET
Constructor Detail

ReadFileSetLog

public ReadFileSetLog(java.lang.String fileName)

ReadFileSetLog

public ReadFileSetLog(java.lang.String fileName,
                      int size,
                      int limit)
Method Detail

getFile

public java.io.File getFile()
Gets the current file in rotating file set
Specified by:
getFile in interface IFileSetLog
Returns:
java.io.File

getFile

public java.io.File getFile(int index)
Gets the file from rotating fileset on given position (index).
Specified by:
getFile in interface IFileSetLog
Returns:
java.io.File

getFileLatest

public java.io.File getFileLatest()
Gets the latest (newest) file from the rotating fileset.
Specified by:
getFileLatest in interface IFileSetLog
Returns:
java.io.File

getFilePrime

public java.io.File getFilePrime()
Gets the prime (oldest) file from the rotating fileset.
Specified by:
getFilePrime in interface IFileSetLog
Returns:
java.io.File

getIndex

public int getIndex()
Gets the current file index in rotating file set
Specified by:
getIndex in interface IFileSetLog
Returns:
Limit file size

setIndex

public void setIndex(int value)
Sets the current file index in rotating file set
Specified by:
setIndex in interface IFileSetLog

setLimit

public void setLimit(int value)
Sets the limit file size used for sequencing on the rotating output file
Specified by:
setLimit in interface IFileSetLog
Returns:
Limit file size

getLimit

public int getLimit()
Gets the limit file size used for sequencing on the rotating output file
Specified by:
getLimit in interface IFileSetLog
Returns:
Limit file size

setSize

public void setSize(int value)
Sets the size of rotating fileset, number of files in fileset.
Specified by:
setSize in interface IFileSetLog
Returns:
Number of files in rotating fileset.

getSize

public int getSize()
Gets the size of rotating fileset, number of files in fileset.
Specified by:
getSize in interface IFileSetLog
Returns:
Number of files in rotating fileset.

isInFileSet

public boolean isInFileSet()
Check is the file in rotating file set
Specified by:
isInFileSet in interface IFileSetLog
Returns:
true if file is part of fileset

isInFileSetMode

public boolean isInFileSetMode()
Helper method. Same like (getMode() == MODE_FILE_SET) Is this Log in FileSet Mode

isInSingleFileMode

public boolean isInSingleFileMode()
Helper method. Same like (getMode() == MODE_SINGLE_FILE) Is this Log in SingleFile Mode

moveToBOFS

public void moveToBOFS()
Move rotating fileset index to the oldest File in the fileset
Specified by:
moveToBOFS in interface IFileSetLog

moveToEOFS

public void moveToEOFS()
Move rotating fileset index to the newest File in the fileset
Specified by:
moveToEOFS in interface IFileSetLog

next

public void next()
Move rotating fileset index to next position. Next position is the file in the fileset where current file last modified date value < next file last modified date value
Specified by:
next in interface IFileSetLog

previous

public void previous()
Move rotating fileset index to previous position. Previous position is the file in the fileset where current file last modified date value > previous file last modified date value
Specified by:
previous in interface IFileSetLog

isStart

public boolean isStart()

isEnd

public boolean isEnd()