Class LogTail

  • All Implemented Interfaces:
    ILogTail

    public class LogTail
    extends java.lang.Object
    implements ILogTail
    Default implementation of the ILogTail interface.
    • Constructor Summary

      Constructors 
      Constructor Description
      LogTail​(java.lang.String logFilePath, long offset, java.util.List<java.lang.String> data)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getData()
      Gets the last block(s) of the errorLog.
      java.lang.String getLogFilePath()
      Gets the log file path.
      long getOffset()
      Gets the offset required to get the next block when it becomes available.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LogTail

        public LogTail​(java.lang.String logFilePath,
                       long offset,
                       @Nonnull
                       java.util.List<java.lang.String> data)
    • Method Detail

      • getLogFilePath

        public java.lang.String getLogFilePath()
        Description copied from interface: ILogTail
        Gets the log file path.

        By default, it's set to null, which is not valid.

        Specified by:
        getLogFilePath in interface ILogTail
        Returns:
        the log file path
      • getOffset

        public long getOffset()
        Description copied from interface: ILogTail
        Gets the offset required to get the next block when it becomes available.

        By default, it is set to -1, which is not valid (same as not setting the offset).

        Specified by:
        getOffset in interface ILogTail
        Returns:
        the offset bytes
      • getData

        public java.util.List<java.lang.String> getData()
        Description copied from interface: ILogTail
        Gets the last block(s) of the errorLog.

        By default, it is set to null, which is not valid.

        Specified by:
        getData in interface ILogTail
        Returns:
        the log data