KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > suberic > util > cache > FileSizedCache


1 package net.suberic.util.cache;
2 import java.io.*;
3
4 /**
5  * A simple file-based cache.
6  */

7 public class FileSizedCache extends AbstractSizedCache {
8
9   // the location of the cache.
10
File sourceDirectory = null;
11
12   /**
13    * Creates a new FileSizedCache.
14    */

15   public FileSizedCache(SizedCacheEntryFactory newFactory, long newMaxSize, long newMaxEntrySize, File directory) {
16     setFactory(newFactory);
17     setMaxSize(newMaxSize);
18     setMaxEntrySize(newMaxEntrySize);
19     setSourceDirectory(directory);
20   }
21
22   
23   /**
24    * Loads the cache.
25    */

26   public void loadCache() throws java.io.IOException JavaDoc {
27
28   }
29   
30   /**
31    * The directory in which this cache lives.
32    */

33   public File getSourceDirectory() {
34     return sourceDirectory;
35   }
36
37   /**
38    * The directory in which this cache lives.
39    */

40   public void setSourceDirectory(File newDirectory) {
41     sourceDirectory = newDirectory;
42   }
43 }
44
Popular Tags