WEB4J Development Tools 4.10.0.0

hirondelle.web4jtools.logview.downtime
Class DownTime

Object
  extended by hirondelle.web4jtools.logview.downtime.DownTime

public final class DownTime
extends Object

Model Object for application down time.

Here, 'down time' has a specific meaning. It is extracted from your application logs only, and not from server logs. It is calculated by examining all the log files in your application's logging directory. Both the last-modified date of the files themselves, and the date attached to the first log record in each log file are examined.

This mechanism assumes that a new log file is created when the application restarts.

If A and B are two consecutive log files, then a down time is calculated as :
(time of first log record in B) - (last-modified date for A)

This class is immutable, and makes defensive copies.


Constructor Summary
DownTime(Date aFrom, Date aTo)
          Full constructor.
 
Method Summary
 boolean equals(Object aThat)
           
 Long getDuration()
          Duration of the down time, in minutes.
 Date getFrom()
           
 Date getTo()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DownTime

public DownTime(Date aFrom,
                Date aTo)
         throws ModelCtorException
Full constructor.

Parameters:
aFrom - Start of down time interval (required).
aTo - End of the down time interval (required).
Throws:
ModelCtorException
Method Detail

getFrom

public Date getFrom()

getTo

public Date getTo()

getDuration

public Long getDuration()
Duration of the down time, in minutes.


toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object aThat)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

WEB4J Development Tools 4.10.0.0

Copyright Hirondelle Systems - Generated 2013Oct19.12.26