Package com.logviewer.data2.net
Class RemoteLog
java.lang.Object
com.logviewer.data2.net.RemoteLog
- All Implemented Interfaces:
LogView
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteLog(LogPath path, LogFormat format, String logId, String hostname, RemoteNodeService remoteNodeService, RemoteLogChangeListenerService remoteLogChangeListenerService) -
Method Summary
Modifier and TypeMethodDescriptionaddChangeListener(Consumer<FileAttributes> changeListener) createRecordSearcher(Position start, boolean backward, RecordPredicate recordPredicate, String hash, int recordCount, SearchPattern searchPattern, Consumer<SearchResult> listener) getId()getPath()booleanloadContent(long offset, int length) Reads a piece of the log.loadRecords(RecordPredicate filter, int recordCount, Position start, boolean backward, String hash, long sizeLimit, LogDataListener listener) readRecordAt(long offset) toString()tryRead()
-
Constructor Details
-
RemoteLog
public RemoteLog(@NonNull LogPath path, @NonNull LogFormat format, @NonNull String logId, @NonNull String hostname, @NonNull RemoteNodeService remoteNodeService, RemoteLogChangeListenerService remoteLogChangeListenerService)
-
-
Method Details
-
getId
-
getPath
-
getHostname
- Specified by:
getHostnamein interfaceLogView
-
getFormat
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceLogView
-
loadRecords
public LogProcess loadRecords(RecordPredicate filter, int recordCount, Position start, boolean backward, String hash, long sizeLimit, @NonNull LogDataListener listener) - Specified by:
loadRecordsin interfaceLogView
-
createRecordSearcher
public LogProcess createRecordSearcher(@NonNull Position start, boolean backward, RecordPredicate recordPredicate, @NonNull String hash, int recordCount, @NonNull SearchPattern searchPattern, @NonNull Consumer<SearchResult> listener) - Specified by:
createRecordSearcherin interfaceLogView
-
addChangeListener
- Specified by:
addChangeListenerin interfaceLogView
-
tryRead
-
readRecordAt
- Specified by:
readRecordAtin interfaceLogView
-
loadContent
Description copied from interface:LogViewReads a piece of the log.- Specified by:
loadContentin interfaceLogView- Parameters:
offset- The offset in the log.length- The number of bytes to read. The actual read piece may be less than 'length'.- Returns:
- A pair of the read text and the actual size of the text in bytes.
-
toString
-