org.quattor.pan.utils
Class FileStatCache

java.lang.Object
  extended by org.quattor.pan.utils.FileStatCache

public class FileStatCache
extends java.lang.Object

Class to cache file modification times. This class minimizes the number of disk accesses to determine the modification times of files. This improves the performance when the same file is requested many times.

Author:
loomis

Constructor Summary
FileStatCache()
           
 
Method Summary
 boolean exists(java.io.File file)
           
 long getModificationTime(java.io.File file)
           
 boolean isMissingOrModifiedAfter(java.io.File file, long targetTime)
           
 boolean isMissingOrModifiedBefore(java.io.File file, long targetTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileStatCache

public FileStatCache()
Method Detail

exists

public boolean exists(java.io.File file)

isMissingOrModifiedAfter

public boolean isMissingOrModifiedAfter(java.io.File file,
                                        long targetTime)

isMissingOrModifiedBefore

public boolean isMissingOrModifiedBefore(java.io.File file,
                                         long targetTime)

getModificationTime

public long getModificationTime(java.io.File file)


Copyright © 2011 Quattor. All Rights Reserved.