com.caucho.vfs
Class PathExistsDependency

java.lang.Object
  extended by com.caucho.vfs.PathExistsDependency
All Implemented Interfaces:
Dependency

public class PathExistsDependency
extends java.lang.Object
implements Dependency

Class for keeping track of modifications.


Constructor Summary
PathExistsDependency(Path source)
          Create a new dependency.
PathExistsDependency(Path source, boolean exists)
          Create a new dependency with an already known modified time and length.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if the test Dependency has the same source path as this dependency.
 Path getPath()
          Returns the underlying source path.
 boolean isModified()
          If the source modified date changes at all, treat it as a modification.
 boolean logModified(java.util.logging.Logger log)
          Log the reason for the modification.
 java.lang.String toString()
          Returns a printable version of the dependency.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PathExistsDependency

public PathExistsDependency(Path source)
Create a new dependency.

Parameters:
source - the source file

PathExistsDependency

public PathExistsDependency(Path source,
                            boolean exists)
Create a new dependency with an already known modified time and length.

Parameters:
source - the source file
Method Detail

getPath

public Path getPath()
Returns the underlying source path.


isModified

public boolean isModified()
If the source modified date changes at all, treat it as a modification. This protects against the case where multiple computers have misaligned dates and a '<' comparison may fail.

Specified by:
isModified in interface Dependency

logModified

public boolean logModified(java.util.logging.Logger log)
Log the reason for the modification.

Specified by:
logModified in interface Dependency

equals

public boolean equals(java.lang.Object obj)
Returns true if the test Dependency has the same source path as this dependency.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Returns a printable version of the dependency.

Overrides:
toString in class java.lang.Object