org.apache.ignite.internal.visor.log

## Class VisorLogSearchResult

- java.lang.Object
- - org.apache.ignite.internal.visor.VisorDataTransferObject
  - - org.apache.ignite.internal.visor.log.VisorLogSearchResult

All Implemented Interfaces:
  Externalizable, Serializable

    public class VisorLogSearchResult
    extends VisorDataTransferObject

Result for log search operation. Contains found line and several lines before and after, plus other info.

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.apache.ignite.internal.visor.VisorDataTransferObject

`V1, V2, V3`

### Constructor Summary

Constructors
Constructor and Description
`VisorLogSearchResult()` Default constructor.
`VisorLogSearchResult(UUID nid, String filePath, long fileSize, long lastModified, String[] lines, int lineNum, int lineCnt, String encoding)` Create log search result with given parameters.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getEncoding()`
`String` `getFilePath()`
`long` `getFileSize()`
`long` `getLastModified()`
`String` `getLine()`
`int` `getLineCount()`
`int` `getLineNumber()`
`List<String>` `getLines()`
`UUID` `getNid()`
`protected void` `readExternalData(byte protoVer, ObjectInput in)` Load object's specific data content.
`String` `toString()`
`protected void` `writeExternalData(ObjectOutput out)` Save object's specific data content.

### Methods inherited from class org.apache.ignite.internal.visor.VisorDataTransferObject

`getProtocolVersion, readExternal, toList, toSet, writeExternal`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### VisorLogSearchResult

    public VisorLogSearchResult()

Default constructor.

#### VisorLogSearchResult

    public VisorLogSearchResult(UUID nid,
                                String filePath,
                                long fileSize,
                                long lastModified,
                                String[] lines,
                                int lineNum,
                                int lineCnt,
                                String encoding)

Create log search result with given parameters.

Parameters:
  `nid` - Node ID.
  `filePath` - File path relative to the search folder.
  `fileSize` - File size.
  `lastModified` - Timestamp of last modification of the file.
  `lines` - Lines of text including found line and several lines before and after.
  `lineNum` - Line number in the file, 1 based.
  `lineCnt` - Lines count in the file.
  `encoding` - File content encoding.

### Method Detail

#### getNid

    public UUID getNid()

Returns:
  Node ID.

#### getFilePath

    public String getFilePath()

Returns:
  File path relative to the search folder.

#### getFileSize

    public long getFileSize()

Returns:
  File size.

#### getLastModified

    public long getLastModified()

Returns:
  Timestamp of last modification of the file.

#### getLines

    public List<String> getLines()

Returns:
  Lines of text including found line and several lines before and after.

#### getLineNumber

    public int getLineNumber()

Returns:
  Line number in the file, 1 based.

#### getLineCount

    public int getLineCount()

Returns:
  Lines count in the file.

#### getEncoding

    public String getEncoding()

Returns:
  File content encoding.

#### getLine

    public String getLine()

Returns:
  Found line.

#### writeExternalData

    protected void writeExternalData(ObjectOutput out)
                              throws IOException

Save object's specific data content.

Specified by:
  `writeExternalData` in class `VisorDataTransferObject`
Parameters:
  `out` - Output object to write data content.
Throws:
  `IOException` - If I/O errors occur.

#### readExternalData

    protected void readExternalData(byte protoVer,
                                    ObjectInput in)
                             throws IOException,
                                    ClassNotFoundException

Load object's specific data content.

Specified by:
  `readExternalData` in class `VisorDataTransferObject`
Parameters:
  `protoVer` - Input object version.
  `in` - Input object to load data content.
Throws:
  `IOException` - If I/O errors occur.
  `ClassNotFoundException` - If the class for an object being restored cannot be found.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.6
Release Date | : September 11 2019