Author: vgritsenko
Date: Mon Nov 12 12:18:08 2007
New Revision: 594285
URL: http://svn.apache.org/viewvc?rev=594285&view=rev
Log:
rename documentCache to cache
Modified:
xml/xindice/trunk/java/src/org/apache/xindice/core/Collection.java
Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/Collection.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/Collection.java?rev=594285&r1=594284&r2=594285&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/core/Collection.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/core/Collection.java Mon Nov 12 12:18:08 2007
@@ -225,7 +225,7 @@
private boolean compressed;
private Filer filer;
private InlineMetaService inlineMetaService;
- private DocumentCache documentCache;
+ private DocumentCache cache;
private IndexManager indexManager;
// document keys identity map
@@ -490,7 +490,7 @@
}
if (config.getBooleanAttribute(CACHE, true)) {
- documentCache = getDatabase().getDocumentCache();
+ cache = getDatabase().getDocumentCache();
}
// If no Filer is defined, skip Symbols and Indexes
@@ -845,8 +845,8 @@
* needs to be converted to an entry cache which can hold both
* Document and byte[].
*/
- if (documentCache != null) {
- Entry entry = documentCache.getEntry(this, key);
+ if (cache != null) {
+ Entry entry = cache.getEntry(this, key);
if (entry != null) {
if (log.isTraceEnabled()) {
log.trace(localDebugHeader + "Returning cached: " + entry.getValue());
@@ -890,8 +890,8 @@
"Compressed XML document=<" + TextWriter.toString(document) + ">");
}
- if (documentCache != null) {
- documentCache.putDocumentEntry(this, key, value.getData(), entryMeta);
+ if (cache != null) {
+ cache.putDocumentEntry(this, key, value.getData(), entryMeta);
}
} else {
String documentChars = value.toString();
@@ -903,8 +903,8 @@
document = parseDocument(key, documentChars);
flushSymbolTable();
- if (documentCache != null) {
- documentCache.putDocumentEntry(this, key, documentChars, entryMeta);
+ if (cache != null) {
+ cache.putDocumentEntry(this, key, documentChars, entryMeta);
}
}
@@ -1324,11 +1324,11 @@
Record record = filer.writeRecord(key, value);
// Cache Stuff
- if (documentCache != null) {
+ if (cache != null) {
if (compressed) {
- documentCache.putDocumentEntry(this, key, documentBytes, Entry.createMetaMap(record));
+ cache.putDocumentEntry(this, key, documentBytes, Entry.createMetaMap(record));
} else {
- documentCache.putDocumentEntry(this, key, documentChars, Entry.createMetaMap(record));
+ cache.putDocumentEntry(this, key, documentChars, Entry.createMetaMap(record));
}
}
@@ -1387,8 +1387,8 @@
if (entry != null && entry.getEntryType() == Entry.DOCUMENT) {
// binary resources aren't stored in cache or indexes
- if (documentCache != null) {
- documentCache.removeEntry(this, key);
+ if (cache != null) {
+ cache.removeEntry(this, key);
}
indexManager.removeDocument(key, (Document) entry.getValue());
}
@@ -1427,8 +1427,8 @@
indexManager.removeDocument(objKey, (Document) entry.getValue());
}
- if (documentCache != null) {
- documentCache.removeEntry(this, objKey);
+ if (cache != null) {
+ cache.removeEntry(this, objKey);
}
if (!filer.deleteRecord(objKey)) {
@@ -1538,8 +1538,8 @@
* If the key has a corresponding value in the cache, return it
* and save a disk access.
*/
- if (documentCache != null) {
- Entry entry = documentCache.getEntryMeta(this, key);
+ if (cache != null) {
+ Entry entry = cache.getEntryMeta(this, key);
if (entry != null) {
return entry;
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.