KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > store > impl > DefaultStore


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.components.store.impl;
17
18 import org.apache.avalon.framework.parameters.ParameterException;
19 import org.apache.avalon.framework.parameters.Parameters;
20 import org.apache.excalibur.store.impl.MRUMemoryStore;
21
22 /**
23  * Default implementation of Cocoon's store. It's a <code>MRUMemoryStore</code> whose
24  * "<code>use-persistent-cache</code>" parameter defaults to <code>true</code>.
25  * <p>
26  * This default setting allows the store to be an in-memory front-end to the persistent store.
27  *
28  * @author <a HREF="http://www.apache.org/~sylvain/">Sylvain Wallez</a>
29  * @version CVS $Id: DefaultStore.java 30932 2004-07-29 17:35:38Z vgritsenko $
30  */

31 public class DefaultStore extends MRUMemoryStore {
32     
33     public void parameterize(Parameters params) throws ParameterException {
34         if (!params.isParameter("use-persistent-cache")) {
35             params.setParameter("use-persistent-cache", "true");
36         }
37         super.parameterize(params);
38     }
39 }
40
Popular Tags