Package org.apache.catalina.ha.deploy
Class WarWatcher.WarInfo
- java.lang.Object
-
- org.apache.catalina.ha.deploy.WarWatcher.WarInfo
-
- Enclosing class:
- WarWatcher
protected static class WarWatcher.WarInfo extends java.lang.ObjectFile information on existing WAR files
-
-
Field Summary
Fields Modifier and Type Field Description protected longlastModifiedThe last time this file was modified.protected longlastStateThe last known state of the file.protected java.io.FilewarThe WAR file being tracked.
-
Constructor Summary
Constructors Constructor Description WarInfo(java.io.File war)Constructs a new WarInfo.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcheck()Returns 1 if the file has been added/modified, 0 if the file is unchanged and -1 if the file has been removedbooleanequals(java.lang.Object other)booleanexists()Returns whether the WAR file exists.java.io.FilegetWar()Returns the WAR file.inthashCode()booleanmodified()Returns whether the WAR file has been modified since last check.protected voidsetLastState(int lastState)Sets the last known state of the file.
-
-
-
Method Detail
-
modified
public boolean modified()
Returns whether the WAR file has been modified since last check.- Returns:
trueif the file has been modified
-
exists
public boolean exists()
Returns whether the WAR file exists.- Returns:
trueif the file exists
-
check
public int check()
Returns 1 if the file has been added/modified, 0 if the file is unchanged and -1 if the file has been removed- Returns:
- int 1=file added; 0=unchanged; -1=file removed
-
getWar
public java.io.File getWar()
Returns the WAR file.- Returns:
- the WAR file
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
setLastState
protected void setLastState(int lastState)
Sets the last known state of the file.- Parameters:
lastState- The last state
-
-