cziegeler 01/07/20 03:27:57
Modified: src/org/apache/cocoon/components/store Tag: cocoon_20_branch
MRUMemoryStore.java
xdocs Tag: cocoon_20_branch docs-book.xml site-book.xml
Log:
Appliedd latest patch and docs
Submitted by: Gerhard Froehlich
Revision Changes Path
No revision
No revision
1.2.2.5 +16 -10
xml-cocoon2/src/org/apache/cocoon/components/store/MRUMemoryStore.java
Index: MRUMemoryStore.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/org/apache/cocoon/components/store/MRUMemoryStore.java,v
retrieving revision 1.2.2.4
retrieving revision 1.2.2.5
diff -u -r1.2.2.4 -r1.2.2.5
--- MRUMemoryStore.java 2001/07/18 10:44:39 1.2.2.4
+++ MRUMemoryStore.java 2001/07/20 10:27:57 1.2.2.5
@@ -21,7 +21,6 @@
import org.apache.cocoon.util.ClassUtils;
import org.apache.cocoon.util.IOUtils;
-
import org.apache.avalon.framework.component.Component;
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.component.ComponentManager;
@@ -98,13 +97,17 @@
private Runtime jvm;
+ /**
+ * Filesystem storage;
+ */
private File cachefile;
private Store fsstore;
private Stack writerstack;
private Thread writer;
private File cachedir;
+ private File workdir;
private String cachedirstr;
-
+
/** the component manager */
protected ComponentManager manager;
@@ -126,15 +129,16 @@
*/
public void contextualize(Context context) throws ContextException {
this.cachedirstr = new String();
+
try {
this.cachedir = (File)context.get(Constants.CONTEXT_CACHE_DIR);
- StringTokenizer stizer = new
StringTokenizer(this.cachedir.getPath(),this.cachedir.separator);
- Vector v = new Vector();
- while (stizer.hasMoreTokens()) {
- v.add(stizer.nextToken());
- }
- cachedirstr = (String)v.lastElement();
- getLogger().debug("MRUMemoryStore contextualize strcachedir=" +
this.cachedirstr);
+ this.workdir = (File)context.get(Constants.CONTEXT_WORK_DIR);
+ this.cachedirstr = IOUtils.getContextFilePath(this.workdir.getPath(),
+ this.cachedir.getPath());
+
+ getLogger().debug("MRUMemoryStore context path="
+ +
IOUtils.getContextFilePath(this.workdir.getPath(),this.cachedir.getPath()));
+
} catch (Exception e) {
getLogger().error("Error in MRUMemoryStore()",e);
}
@@ -378,7 +382,9 @@
}
/**
- * This method checks if an object is seriazable
+ * This method checks if an object is seriazable.
+ * FIXME: In the moment only CachedEventObject or
+ * CachedStreamObject are stored.
*/
private boolean checkSeriazable(Object object) {
try {
No revision
No revision
1.3.2.16 +1 -0 xml-cocoon2/xdocs/docs-book.xml
Index: docs-book.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/docs-book.xml,v
retrieving revision 1.3.2.15
retrieving revision 1.3.2.16
diff -u -r1.3.2.15 -r1.3.2.16
--- docs-book.xml 2001/07/19 13:46:58 1.3.2.15
+++ docs-book.xml 2001/07/20 10:27:57 1.3.2.16
@@ -62,6 +62,7 @@
<page id="flow" label="Flow" source="httprequest.xml"/>
<page id="caching" label="Caching" source="caching.xml"/>
+ <page id="mrustore" label="MRU Store" source="mrustore.xml"/>
<page id="sessions" label="Sessions" source="sessions.xml"/>
<page id="datasources" label="Using Databases" source="datasources.xml"/>
<page id="extending" label="Extending C2" source="extending.xml"/>
1.3.2.18 +1 -0 xml-cocoon2/xdocs/site-book.xml
Index: site-book.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/site-book.xml,v
retrieving revision 1.3.2.17
retrieving revision 1.3.2.18
diff -u -r1.3.2.17 -r1.3.2.18
--- site-book.xml 2001/07/19 14:20:01 1.3.2.17
+++ site-book.xml 2001/07/20 10:27:57 1.3.2.18
@@ -65,6 +65,7 @@
<page id="flow" label="Flow" source="httprequest.xml"/>
<page id="caching" label="Caching" source="caching.xml"/>
+ <page id="mrustore" label="MRU Store" source="mrustore.xml"/>
<page id="sessions" label="Sessions" source="sessions.xml"/>
<page id="datasources" label="Using Databases" source="datasources.xml"/>
<page id="extending" label="Extending C2" source="extending.xml"/>
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]