01: package net.suberic.util.cache;
02:
03: import java.io.*;
04:
05: /**
06: * A simple file-based cache.
07: */
08: public class FileSizedCache extends AbstractSizedCache {
09:
10: // the location of the cache.
11: File sourceDirectory = null;
12:
13: /**
14: * Creates a new FileSizedCache.
15: */
16: public FileSizedCache(SizedCacheEntryFactory newFactory,
17: long newMaxSize, long newMaxEntrySize, File directory) {
18: setFactory(newFactory);
19: setMaxSize(newMaxSize);
20: setMaxEntrySize(newMaxEntrySize);
21: setSourceDirectory(directory);
22: }
23:
24: /**
25: * Loads the cache.
26: */
27: public void loadCache() throws java.io.IOException {
28:
29: }
30:
31: /**
32: * The directory in which this cache lives.
33: */
34: public File getSourceDirectory() {
35: return sourceDirectory;
36: }
37:
38: /**
39: * The directory in which this cache lives.
40: */
41: public void setSourceDirectory(File newDirectory) {
42: sourceDirectory = newDirectory;
43: }
44: }
|