*) setting htCache.Entry fields to private

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2485 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent 393a7d10be
commit 3870d615e3

@ -131,7 +131,7 @@ public class ViewFile {
plasmaHTCache.Entry entry = sb.snippetCache.loadResourceFromWeb(url, 5000); plasmaHTCache.Entry entry = sb.snippetCache.loadResourceFromWeb(url, 5000);
if (entry != null) { if (entry != null) {
resHeader = entry.responseHeader; resHeader = entry.responseHeader();
} }
resource = sb.cacheManager.loadResource(url); resource = sb.cacheManager.loadResource(url);

@ -629,8 +629,8 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt
res.responseHeader); res.responseHeader);
String storeError = cacheEntry.shallStoreCacheForProxy(); String storeError = cacheEntry.shallStoreCacheForProxy();
boolean storeHTCache = cacheEntry.profile.storeHTCache(); boolean storeHTCache = cacheEntry.profile().storeHTCache();
boolean isSupportedContent = plasmaParser.supportedContent(plasmaParser.PARSER_MODE_PROXY,cacheEntry.url(),cacheEntry.responseHeader.mime()); boolean isSupportedContent = plasmaParser.supportedContent(plasmaParser.PARSER_MODE_PROXY,cacheEntry.url(),cacheEntry.responseHeader().mime());
if ( if (
/* /*
* Now we store the response into the htcache directory 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) { if (sizeBeforeDelete == -1) {
// totally fresh file // totally fresh file
//cacheEntry.status = plasmaHTCache.CACHE_FILL; // it's an insert //cacheEntry.status = plasmaHTCache.CACHE_FILL; // it's an insert
cacheEntry.cacheArray = cacheArray; cacheEntry.setCacheArray(cacheArray);
cacheManager.push(cacheEntry); cacheManager.push(cacheEntry);
conProp.setProperty(httpHeader.CONNECTION_PROP_PROXY_RESPOND_CODE,"TCP_MISS"); conProp.setProperty(httpHeader.CONNECTION_PROP_PROXY_RESPOND_CODE,"TCP_MISS");
} else if (sizeBeforeDelete == cacheArray.length) { } else if (sizeBeforeDelete == cacheArray.length) {
@ -667,7 +667,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt
} else { } else {
// before we came here we deleted a cache entry // before we came here we deleted a cache entry
//cacheEntry.status = plasmaHTCache.CACHE_STALE_RELOAD_GOOD; //cacheEntry.status = plasmaHTCache.CACHE_STALE_RELOAD_GOOD;
cacheEntry.cacheArray = cacheArray; cacheEntry.setCacheArray(cacheArray);
cacheManager.push(cacheEntry); // necessary update, write response header to cache cacheManager.push(cacheEntry); // necessary update, write response header to cache
conProp.setProperty(httpHeader.CONNECTION_PROP_PROXY_RESPOND_CODE,"TCP_REFRESH_MISS"); conProp.setProperty(httpHeader.CONNECTION_PROP_PROXY_RESPOND_CODE,"TCP_REFRESH_MISS");
} }

@ -813,8 +813,8 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
* *
* Testing if the content type is supported by the available parsers * Testing if the content type is supported by the available parsers
* ========================================================================= */ * ========================================================================= */
boolean isSupportedContent = (entry.responseHeader != null) && boolean isSupportedContent = (entry.responseHeader() != null) &&
plasmaParser.supportedContent(entry.url(),entry.responseHeader.mime()); plasmaParser.supportedContent(entry.url(),entry.responseHeader().mime());
/* ========================================================================= /* =========================================================================
* INDEX CONTROL HEADER * INDEX CONTROL HEADER
@ -863,8 +863,8 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
(doIndexing && isSupportedContent) (doIndexing && isSupportedContent)
) { ) {
// store response header // store response header
if (entry.responseHeader != null) { if (entry.responseHeader() != null) {
this.cacheManager.storeHeader(entry.urlHash(), entry.responseHeader); this.cacheManager.storeHeader(entry.urlHash(), entry.responseHeader());
this.log.logInfo("WROTE HEADER for " + entry.cacheFile()); this.log.logInfo("WROTE HEADER for " + entry.cacheFile());
} }

Loading…
Cancel
Save