GigaSpaces XAP 10.0.1 API

com.gigaspaces.log
Class LogEntries

java.lang.Object
  extended by com.gigaspaces.log.LogEntries
All Implemented Interfaces:
Externalizable, Serializable, Iterable<LogEntry>

public class LogEntries
extends Object
implements Iterable<LogEntry>, Externalizable

A collection of log entries, including meta information such as process id, host information.

Author:
kimchy
See Also:
Serialized Form

Constructor Summary
LogEntries()
          Default constructor for Externalizable readExternal usage
LogEntries(LogProcessType processType, List<LogEntry> entries, int totalLogFiles, long pid, long latestTimestamp, String hostName, String hostAddress)
           
LogEntries(LogProcessType processType, long pid, String hostName, String hostAddress)
          Empty LogEntries
 
Method Summary
 LogEntry findFileMarkerFor(LogEntry logEntry)
          Finds the log entry of type LogEntry.Type.FILE_MARKER that corresponds the the provided log entry.
 List<LogEntry> getEntries()
          The list of log entries.
 String getHostAddress()
          Ths host name of the process responsible for writing the log entries.
 String getHostName()
          Ths host name of the process responsible for writing the log entries.
 long getLatestLogFileTimestamp()
          The latest timestamp of change happened to the log file.
 long getPid()
          The process id of the process responsible for writing the log entries.
 LogProcessType getProcessType()
          The process type that generated the logs.
 int getTotalLogFiles()
          Returns the total number of log files scanned.
 Iterator<LogEntry> iterator()
           
 List<LogEntry> logEntries()
          Returns a list of all the LogEntry which are of the log type (represent an actual log line).
 void readExternal(ObjectInput in)
           
 List<LogEntry> typeEntries(LogEntry.Type type)
          Returns a list of all the LogEntry which are of the prvided type.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogEntries

public LogEntries()
Default constructor for Externalizable readExternal usage


LogEntries

public LogEntries(LogProcessType processType,
                  long pid,
                  String hostName,
                  String hostAddress)
Empty LogEntries


LogEntries

public LogEntries(LogProcessType processType,
                  List<LogEntry> entries,
                  int totalLogFiles,
                  long pid,
                  long latestTimestamp,
                  String hostName,
                  String hostAddress)
Method Detail

getProcessType

public LogProcessType getProcessType()
The process type that generated the logs.


getEntries

public List<LogEntry> getEntries()
The list of log entries.


getPid

public long getPid()
The process id of the process responsible for writing the log entries.


getHostName

public String getHostName()
Ths host name of the process responsible for writing the log entries.


getHostAddress

public String 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

public Iterator<LogEntry> iterator()
Specified by:
iterator in interface Iterable<LogEntry>

logEntries

public List<LogEntry> logEntries()
Returns a list of all the LogEntry which are of the log type (represent an actual log line).


typeEntries

public List<LogEntry> typeEntries(LogEntry.Type type)
Returns a list of all the LogEntry which are of the prvided type.


findFileMarkerFor

public LogEntry findFileMarkerFor(LogEntry logEntry)
Finds the log entry of type LogEntry.Type.FILE_MARKER that corresponds the the provided log entry. Basically, allows to get information about the actual file from where this log entry was extracted.


writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.