Class WarWatcher.WarInfo
java.lang.Object
org.apache.catalina.ha.deploy.WarWatcher.WarInfo
- Enclosing class:
WarWatcher
File information on existing WAR files
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longThe last time this file was modified.protected longThe last known state of the file.protected final FileThe WAR file being tracked. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcheck()Returns 1 if the file has been added/modified, 0 if the file is unchanged and -1 if the file has been removedbooleanbooleanexists()Returns whether the WAR file exists.getWar()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.
-
Field Details
-
war
The WAR file being tracked. -
lastModified
protected long lastModifiedThe last time this file was modified. -
lastState
protected long lastStateThe last known state of the file.
-
-
Constructor Details
-
WarInfo
-
-
Method Details
-
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
-
hashCode
-
equals
-
setLastState
protected void setLastState(int lastState) Sets the last known state of the file.- Parameters:
lastState- The last state
-