Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

*) setting htCache.Entry fields to private

theli3870d615e36d
diff --git a/htroot/ViewFile.java b/htroot/ViewFile.java
index 74f520348..b5bafe5e0 100644
--- a/htroot/ViewFile.java
+++ b/htroot/ViewFile.java
@@ -131,7 +131,7 @@ public class ViewFile {
plasmaHTCache.Entry entry = sb.snippetCache.loadResourceFromWeb(url, 5000);
if (entry != null) {
- resHeader = entry.responseHeader;
+ resHeader = entry.responseHeader();
}
resource = sb.cacheManager.loadResource(url);
diff --git a/source/de/anomic/http/httpdProxyHandler.java b/source/de/anomic/http/httpdProxyHandler.java
index 4accb1604..c318aced4 100644
--- a/source/de/anomic/http/httpdProxyHandler.java
+++ b/source/de/anomic/http/httpdProxyHandler.java
@@ -629,8 +629,8 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt
res.responseHeader);
String storeError = cacheEntry.shallStoreCacheForProxy();
- boolean storeHTCache = cacheEntry.profile.storeHTCache();
- boolean isSupportedContent = plasmaParser.supportedContent(plasmaParser.PARSER_MODE_PROXY,cacheEntry.url(),cacheEntry.responseHeader.mime());
+ boolean storeHTCache = cacheEntry.profile().storeHTCache();
+ boolean isSupportedContent = plasmaParser.supportedContent(plasmaParser.PARSER_MODE_PROXY,cacheEntry.url(),cacheEntry.responseHeader().mime());
if (
/*
* Now we store the response into the htcache directory if
@@ -655,7 +655,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt
if (sizeBeforeDelete == -1) {
// totally fresh file
//cacheEntry.status = plasmaHTCache.CACHE_FILL; // it's an insert
- cacheEntry.cacheArray = cacheArray;
+ cacheEntry.setCacheArray(cacheArray);
cacheManager.push(cacheEntry);
conProp.setProperty(httpHeader.CONNECTION_PROP_PROXY_RESPOND_CODE,"TCP_MISS");
} else if (sizeBeforeDelete == cacheArray.length) {
@@ -667,7 +667,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt
} else {
// before we came here we deleted a cache entry
//cacheEntry.status = plasmaHTCache.CACHE_STALE_RELOAD_GOOD;
- cacheEntry.cacheArray = cacheArray;
+ cacheEntry.setCacheArray(cacheArray);
cacheManager.push(cacheEntry); // necessary update, write response header to cache
conProp.setProperty(httpHeader.CONNECTION_PROP_PROXY_RESPOND_CODE,"TCP_REFRESH_MISS");
}
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java
index 9a13401c0..29ebb5b4f 100644
--- a/source/de/anomic/plasma/plasmaSwitchboard.java
+++ b/source/de/anomic/plasma/plasmaSwitchboard.java
@@ -813,8 +813,8 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
*
* Testing if the content type is supported by the available parsers
* ========================================================================= */
- boolean isSupportedContent = (entry.responseHeader != null) &&
- plasmaParser.supportedContent(entry.url(),entry.responseHeader.mime());
+ boolean isSupportedContent = (entry.responseHeader() != null) &&
+ plasmaParser.supportedContent(entry.url(),entry.responseHeader().mime());
/* =========================================================================
* INDEX CONTROL HEADER
@@ -863,8 +863,8 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
(doIndexing && isSupportedContent)
) {
// store response header
- if (entry.responseHeader != null) {
- this.cacheManager.storeHeader(entry.urlHash(), entry.responseHeader);
+ if (entry.responseHeader() != null) {
+ this.cacheManager.storeHeader(entry.urlHash(), entry.responseHeader());
this.log.logInfo("WROTE HEADER for " + entry.cacheFile());
}