com.caucho.vfs
Class BasicDependencyContainer

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

public class BasicDependencyContainer
extends java.lang.Object
implements Dependency

Contains a set of dependencies.


Constructor Summary
BasicDependencyContainer()
           
 
Method Summary
 BasicDependencyContainer add(Dependency dependency)
          Adds a dependency.
 void clearModified()
          Clears the modified flag and sets the last check time to now.
 long getCheckInterval()
          Gets the check modification check interval.
 boolean isModified()
          Returns true if the underlying dependencies have changed.
 boolean isModifiedNow()
          Returns true if the underlying dependencies have changed, forcing a check.
 boolean logModified(java.util.logging.Logger log)
          Log the reason for the modification
 BasicDependencyContainer remove(Dependency dependency)
          Removes a dependency.
 void resetDependencyCheckInterval()
          Resets the check interval.
 void setCheckInterval(long checkInterval)
          Sets the check modification check interval in milliseconds.
 void setModified(boolean isModified)
          Sets the modified.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicDependencyContainer

public BasicDependencyContainer()
Method Detail

add

public BasicDependencyContainer add(Dependency dependency)
Adds a dependency.


remove

public BasicDependencyContainer remove(Dependency dependency)
Removes a dependency.


setCheckInterval

public void setCheckInterval(long checkInterval)
Sets the check modification check interval in milliseconds. Negative values mean never check. 0 means always check.

Parameters:
checkInterval - how often the dependency should be checked

getCheckInterval

public long getCheckInterval()
Gets the check modification check interval. Negative values mean never check. 0 means always check.


setModified

public void setModified(boolean isModified)
Sets the modified.


resetDependencyCheckInterval

public void resetDependencyCheckInterval()
Resets the check interval.


clearModified

public void clearModified()
Clears the modified flag and sets the last check time to now.


isModified

public boolean isModified()
Returns true if the underlying dependencies have changed.

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

isModifiedNow

public boolean isModifiedNow()
Returns true if the underlying dependencies have changed, forcing a check.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object