org.apache.cocoon.caching
Class DeltaTimeCacheValidity

java.lang.Object
  |
  +--org.apache.cocoon.caching.DeltaTimeCacheValidity
All Implemented Interfaces:
CacheValidity, java.io.Serializable

public final class DeltaTimeCacheValidity
extends java.lang.Object
implements CacheValidity

A validation object that remains valid for a specified amount of time.

Version:
CVS $Id: DeltaTimeCacheValidity.java,v 1.7.2.1 2002/04/21 17:29:49 vgritsenko Exp $
Author:
Michael Homeijer
See Also:
Serialized Form

Constructor Summary
DeltaTimeCacheValidity(long minutes)
          Creates validity object with timeout in minutes.
DeltaTimeCacheValidity(long minutes, long seconds)
          Creates validity object with timeout in minutes, seconds.
DeltaTimeCacheValidity(long minutes, long seconds, long milliseconds)
          Creates validity object with timeout in minutes, seconds and milliseconds.
 
Method Summary
 long getCachedDateTime()
           
 boolean isValid(CacheValidity validity)
          Check if the component is still valid.
 java.lang.String toString()
          Creates text represenation of the validity object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeltaTimeCacheValidity

public DeltaTimeCacheValidity(long minutes)
Creates validity object with timeout in minutes.

DeltaTimeCacheValidity

public DeltaTimeCacheValidity(long minutes,
                              long seconds)
Creates validity object with timeout in minutes, seconds.

DeltaTimeCacheValidity

public DeltaTimeCacheValidity(long minutes,
                              long seconds,
                              long milliseconds)
Creates validity object with timeout in minutes, seconds and milliseconds.
Method Detail

isValid

public boolean isValid(CacheValidity validity)
Description copied from interface: CacheValidity
Check if the component is still valid. This is only true, if the incoming CacheValidity is of the same type and has the same values.
Specified by:
isValid in interface CacheValidity

getCachedDateTime

public long getCachedDateTime()

toString

public java.lang.String toString()
Description copied from interface: CacheValidity
Creates text represenation of the validity object. This is used to create fake 'lastModificationDate' for cocoon: sources.

Due to changes in source API, this method is no longer needed, starting with Cocoon 2.1.

Specified by:
toString in interface CacheValidity
Overrides:
toString in class java.lang.Object


Copyright � 1999-2002 Apache Software Foundation. All Rights Reserved.