comparison servlet/src/digilib/io/DocuDirCache.java @ 750:4f5aaa0de456 jquery

removed synchronized from some methods
author robcast
date Sat, 05 Feb 2011 16:47:31 +0100
parents 686086d6e6d6
children 485b85f6e097
comparison
equal deleted inserted replaced
749:109cd6fbec49 750:4f5aaa0de456
102 * 102 *
103 * @param newdir 103 * @param newdir
104 */ 104 */
105 public void put(DocuDirectory newdir) { 105 public void put(DocuDirectory newdir) {
106 String s = newdir.getDirName(); 106 String s = newdir.getDirName();
107 logger.debug("DocuDirCache.put for "+s+" in "+this);
107 if (map.containsKey(s)) { 108 if (map.containsKey(s)) {
108 logger.warn("Duplicate key in DocuDirCache.put -- ignoring!"); 109 logger.warn("Duplicate key in DocuDirCache.put -- ignoring!");
109 } else { 110 } else {
110 map.put(s, newdir); 111 map.put(s, newdir);
111 numFiles += newdir.size(); 112 numFiles += newdir.size();
115 /** 116 /**
116 * Add a directory to the cache and check its parents. 117 * Add a directory to the cache and check its parents.
117 * 118 *
118 * @param newDir 119 * @param newDir
119 */ 120 */
120 public synchronized void putDir(DocuDirectory newDir) { 121 public void putDir(DocuDirectory newDir) {
121 put(newDir); 122 put(newDir);
122 String parent = FileOps.parent(newDir.getDirName()); 123 String parent = FileOps.parent(newDir.getDirName());
123 if (parent != "") { 124 if (parent != "") {
124 // check the parent in the cache 125 // check the parent in the cache
125 DocuDirectory pd = map.get(parent); 126 DocuDirectory pd = map.get(parent);