1 17 18 package org.apache.naming.resources; 19 20 import javax.naming.directory.DirContext ; 21 22 28 public class CacheEntry { 29 30 31 33 34 public long timestamp = -1; 35 public String name = null; 36 public ResourceAttributes attributes = null; 37 public Resource resource = null; 38 public DirContext context = null; 39 public boolean exists = true; 40 public long accessCount = 0; 41 public int size = 1; 42 43 44 46 47 public void recycle() { 48 timestamp = -1; 49 name = null; 50 attributes = null; 51 resource = null; 52 context = null; 53 exists = true; 54 accessCount = 0; 55 size = 1; 56 } 57 58 59 public String toString() { 60 return ("Cache entry: " + name + "\n" 61 + "Exists: " + exists + "\n" 62 + "Attributes: " + attributes + "\n" 63 + "Resource: " + resource + "\n" 64 + "Context: " + context); 65 } 66 67 68 } 69 | Popular Tags |