cz.hdf.cdnavigator
Class Cache.Cacher

java.lang.Object
  extended by cz.hdf.cdnavigator.Cache.Cacher
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
Cache

private class Cache.Cacher
extends java.lang.Object
implements java.lang.Runnable

Cache/copy files into cache directory. This can delete old cache files when is not enough space for new files. Wake up Updater when some change is made.


Field Summary
private static int CLEAR_NOT_ENOUGH_SPACE
           
private static int CLEAR_NOT_ENOUGH_SPACE_EMPTY
           
private static int CLEAR_OK
           
private  long time
           
 
Constructor Summary
private Cache.Cacher()
           
 
Method Summary
(package private)  void cacheFile(CDData cd, java.lang.String file)
           
private  int clearCache(long _size)
          Find oldest files to specified size and delete them.
 void run()
          start cache process. update time or copy file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLEAR_OK

private static final int CLEAR_OK
See Also:
Constant Field Values

CLEAR_NOT_ENOUGH_SPACE

private static final int CLEAR_NOT_ENOUGH_SPACE
See Also:
Constant Field Values

CLEAR_NOT_ENOUGH_SPACE_EMPTY

private static final int CLEAR_NOT_ENOUGH_SPACE_EMPTY
See Also:
Constant Field Values

time

private long time
Constructor Detail

Cache.Cacher

private Cache.Cacher()
Method Detail

cacheFile

void cacheFile(CDData cd,
               java.lang.String file)
Parameters:
cdID -
file -

clearCache

private int clearCache(long _size)
Find oldest files to specified size and delete them.

Parameters:
_size - delete files to this size
Returns:

run

public void run()
start cache process. update time or copy file

Specified by:
run in interface java.lang.Runnable


CDnavigator JavaDoc, HDF company www.hdf.cz