01: package com.flexive.war.webdav.catalina;
02:
03: import javax.naming.directory.DirContext;
04:
05: /**
06: * Catalina sources cloned for packaging issues to the flexive source tree.
07: * Refactored to JDK 1.5 compatibility.
08: * Licensed under the Apache License, Version 2.0
09: * <p/>
10: * Implements a cache entry.
11: *
12: * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
13: * @author Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
14: */
15: public class CacheEntry {
16:
17: // ------------------------------------------------- Instance Variables
18:
19: public long timestamp = -1;
20: public String name = null;
21: public ResourceAttributes attributes = null;
22: public Resource resource = null;
23: public DirContext context = null;
24: public boolean exists = true;
25: public long accessCount = 0;
26: public int size = 1;
27:
28: // ----------------------------------------------------- Public Methods
29:
30: public void recycle() {
31: timestamp = -1;
32: name = null;
33: attributes = null;
34: resource = null;
35: context = null;
36: exists = true;
37: accessCount = 0;
38: size = 1;
39: }
40:
41: public String toString() {
42: return ("Cache entry: " + name + "\n" + "Exists: " + exists
43: + "\n" + "Attributes: " + attributes + "\n"
44: + "Resource: " + resource + "\n" + "Context: " + context);
45: }
46:
47: }
|