Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tomcat.util.depend
Class Dependency

    java.lang.Object
      org.apache.tomcat.util.depend.Dependency

public final class Dependency
extends java.lang.Object

Represents a dependency between a real file and a server object. The servler object has a timestamp, and it is compared with the file lastModified time to detect changes. The DependManager will do the checkings ( with the minimal possible overhead ).

Constructor Summary
`Dependency()`

Method Summary
`boolean` | `checkExpiry()` Check if the origin changed since target's was lastModified.
`long` | `getLastModified()`
`java.io.File` | `getOrigin()`
`java.lang.Object` | `getTarget()`
`boolean` | `isExpired()`
`boolean` | `isLocal()`
`void` | `reset()`
`void` | `setExpired(boolean b)` Mark this dependency as expired.
`void` | `setLastModified(long v)` The time when the server-side object has been loaded/modified.
`void` | `setLocal(boolean b)` If set, the dependency will be "local", i.e.
`void` | `setOrigin(java.io.File v)` The file on which the server-side object depends or has been loaded from.
`void` | `setTarget(java.lang.Object v)` Server-side object that is checked for dependency on the file.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Dependency

    public Dependency()

Method Detail

### setLastModified

    public void setLastModified(long v)

  The time when the server-side object has been loaded/modified.

  Parameters:
    `v` - modification time

### getLastModified

    public long getLastModified()

### reset

    public void reset()

### setLocal

    public void setLocal(boolean b)

  If set, the dependency will be "local", i.e. will be marked as expired but the DependManager will not triger an expire at a higher level ( example: if a JSP changes, no need to reload the context )

### isLocal

    public boolean isLocal()

### setExpired

    public void setExpired(boolean b)

  Mark this dependency as expired.

### isExpired

    public boolean isExpired()

### setOrigin

    public void setOrigin(java.io.File v)

  The file on which the server-side object depends or has been loaded from.

  Parameters:
    `v` - Value to assign to origin.

### getOrigin

    public java.io.File getOrigin()

### setTarget

    public void setTarget(java.lang.Object v)

  Server-side object that is checked for dependency on the file.

  Parameters:
    `v` - Value to assign to target.

### getTarget

    public java.lang.Object getTarget()

### toString

    public java.lang.String toString()

### checkExpiry

    public boolean checkExpiry()

  Check if the origin changed since target's was lastModified. This will be called periodically by DependManager or can be called to force a check for this particular dependency.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Apache Software Foundation. All Rights Reserved.