Package com.gigaspaces.log
Class LogEntries
java.lang.Object
com.gigaspaces.log.LogEntries
- All Implemented Interfaces:
Externalizable,Serializable,Iterable<LogEntry>
A collection of log entries, including meta information such as process id, host information.
- Author:
- kimchy
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for Externalizable readExternal usageLogEntries(LogProcessType processType, long pid, String hostName, String hostAddress) Empty LogEntriesLogEntries(LogProcessType processType, List<LogEntry> entries, int totalLogFiles, long pid, long latestTimestamp, String hostName, String hostAddress) -
Method Summary
Modifier and TypeMethodDescriptionfindFileMarkerFor(LogEntry logEntry) Finds the log entry of typeLogEntry.Type.FILE_MARKERthat corresponds the the provided log entry.The list of log entries.Ths host name of the process responsible for writing the log entries.Ths host name of the process responsible for writing the log entries.longThe latest timestamp of change happened to the log file.longgetPid()The process id of the process responsible for writing the log entries.The process type that generated the logs.intReturns the total number of log files scanned.iterator()Returns a list of all theLogEntrywhich are of the log type (represent an actual log line).voidtypeEntries(LogEntry.Type type) Returns a list of all theLogEntrywhich are of the prvided type.voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
LogEntries
public LogEntries()Default constructor for Externalizable readExternal usage -
LogEntries
Empty LogEntries -
LogEntries
public LogEntries(LogProcessType processType, List<LogEntry> entries, int totalLogFiles, long pid, long latestTimestamp, String hostName, String hostAddress)
-
-
Method Details
-
getProcessType
The process type that generated the logs. -
getEntries
The list of log entries. -
getPid
public long getPid()The process id of the process responsible for writing the log entries. -
getHostName
Ths host name of the process responsible for writing the log entries. -
getHostAddress
Ths host name of the process responsible for writing the log entries. -
getLatestLogFileTimestamp
public long getLatestLogFileTimestamp()The latest timestamp of change happened to the log file. -
getTotalLogFiles
public int getTotalLogFiles()Returns the total number of log files scanned. -
iterator
-
logEntries
Returns a list of all theLogEntrywhich are of the log type (represent an actual log line). -
typeEntries
Returns a list of all theLogEntrywhich are of the prvided type. -
findFileMarkerFor
Finds the log entry of typeLogEntry.Type.FILE_MARKERthat corresponds the the provided log entry. Basically, allows to get information about the actual file from where this log entry was extracted. -
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-