cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From froehl...@apache.org
Subject cvs commit: xml-cocoon2/scratchpad/src/org/apache/cocoon/jispstore JispFilesystemStore.java MRUMemoryStore.java FilesystemQueueImpl.java JispStringKey.java
Date Mon, 17 Dec 2001 18:18:12 GMT
froehlich    01/12/17 10:18:12

  Modified:    scratchpad/src/org/apache/cocoon/jispstore
                        JispFilesystemStore.java MRUMemoryStore.java
                        FilesystemQueueImpl.java JispStringKey.java
  Log:
  uups too much formating
  
  Revision  Changes    Path
  1.10      +22 -11    xml-cocoon2/scratchpad/src/org/apache/cocoon/jispstore/JispFilesystemStore.java
  
  Index: JispFilesystemStore.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/scratchpad/src/org/apache/cocoon/jispstore/JispFilesystemStore.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JispFilesystemStore.java	2001/12/17 18:09:14	1.9
  +++ JispFilesystemStore.java	2001/12/17 18:18:12	1.10
  @@ -34,7 +34,8 @@
    *  (http://www.coyotegulch.com/jisp/index.html) This store uses B-Tree indexes
    *  to access variable-length serialized data stored in files.
    *
  - * @author Gerhard Froehlich <a href="mailto:g-froehlich@gmx.de">Gerhard Froehlich</a>
  + * @author Gerhard Froehlich 
  + *  <a href="mailto:g-froehlich@gmx.de">Gerhard Froehlich</a>
    */
   public final class JispFilesystemStore
   extends AbstractLoggable
  @@ -100,7 +101,8 @@
                */
               if (!this.mDirectoryFile.mkdir()) {
                   throw new IOException(
  -                        "Error creating store directory '" + this.mDirectoryPath + "':
");
  +                        "Error creating store directory '" 
  +                        + this.mDirectoryPath + "': ");
               }
           }
   
  @@ -108,15 +110,18 @@
            *  Is given file actually a directory?
            */
           if (!this.mDirectoryFile.isDirectory()) {
  -            throw new IOException("'" + this.mDirectoryPath + "' is not a directory");
  +            throw new IOException("'" + this.mDirectoryPath 
  +                                  + "' is not a directory");
           }
   
           /*
            *  Is directory readable and writable?
            */
  -        if (!(this.mDirectoryFile.canRead() && this.mDirectoryFile.canWrite()))
{
  +        if (!(this.mDirectoryFile.canRead()
  +              && this.mDirectoryFile.canWrite())) {
               throw new IOException(
  -                    "Directory '" + this.mDirectoryPath + "' is not readable/writable"
  +                    "Directory '" + this.mDirectoryPath 
  +                    + "' is not readable/writable"
                       );
           }
       }
  @@ -187,7 +192,8 @@
   
           try {
               if (getLogger().isDebugEnabled()) {
  -                getLogger().debug("initialize(): Path to Datafile=" + this.getDirectoryPath()
+ mDatabaseName);
  +                getLogger().debug("initialize(): Path to Datafile=" 
  +                + this.getDirectoryPath() + mDatabaseName);
               }
               File myFile = new File(this.getDirectoryPath() + mDatabaseName);
   
  @@ -195,7 +201,8 @@
                   if (getLogger().isDebugEnabled()) {
                       this.getLogger().debug("initialize(): Datafile exists");
                   }
  -                mDatabase = new IndexedObjectDatabase(getDirectoryPath() + mDatabaseName,
false);
  +                mDatabase = new IndexedObjectDatabase(getDirectoryPath() 
  +                                + mDatabaseName, false);
                   mIndex = new BTreeIndex(this.getDirectoryPath() + mIndexName);
                   mDatabase.attachIndex(mIndex);
                   mIndex.dumpTree();
  @@ -203,7 +210,8 @@
                   if (getLogger().isDebugEnabled()) {
                       this.getLogger().debug("initialize(): Datafile not exists");
                   }
  -                mDatabase = new IndexedObjectDatabase(getDirectoryPath() + mDatabaseName,
false);
  +                mDatabase = new IndexedObjectDatabase(getDirectoryPath() 
  +                            + mDatabaseName, false);
                   mIndex = new BTreeIndex(this.getDirectoryPath() + mIndexName,
                           mOrder, new JispStringKey(), false);
                   mDatabase.attachIndex(mIndex);
  @@ -238,8 +246,10 @@
           mOrder = params.getParameterAsInteger("order", 1001);
   
           if (getLogger().isDebugEnabled()) {
  -            this.getLogger().debug("parameterize(..): mDatabaseName=" + mDatabaseName);
  -            this.getLogger().debug("parameterize(..): mIndexName=" + mIndexName);
  +            this.getLogger().debug("parameterize(..): mDatabaseName=" 
  +                                    + mDatabaseName);
  +            this.getLogger().debug("parameterize(..): mIndexName=" 
  +                                    + mIndexName);
               this.getLogger().debug("parameterize(..): mOrder=" + mOrder);
           }
       }
  @@ -255,7 +265,8 @@
       public void store(Object key, Object value)
           throws IOException {
           if (getLogger().isDebugEnabled()) {
  -            this.getLogger().debug("store(): Store file with key: " + key.toString());
  +            this.getLogger().debug("store(): Store file with key: " 
  +                                  + key.toString());
           }
   
           if (value instanceof Serializable) {
  
  
  
  1.7       +23 -15    xml-cocoon2/scratchpad/src/org/apache/cocoon/jispstore/MRUMemoryStore.java
  
  Index: MRUMemoryStore.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/scratchpad/src/org/apache/cocoon/jispstore/MRUMemoryStore.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MRUMemoryStore.java	2001/12/17 18:09:14	1.6
  +++ MRUMemoryStore.java	2001/12/17 18:18:12	1.7
  @@ -1,10 +1,10 @@
  -/**
  - *  Copyright (C) The Apache Software Foundation. All rights reserved. *
  - *  ------------------------------------------------------------------------- *
  - *  This software is published under the terms of the Apache Software License *
  - *  version 1.1, a copy of which has been included with this distribution in *
  - *  the LICENSE file. *
  - */
  +/*****************************************************************************
  + * Copyright (C) The Apache Software Foundation. All rights reserved.        *
  + * ------------------------------------------------------------------------- *
  + * This software is published under the terms of the Apache Software License *
  + * version 1.1, a copy of which has been included  with this distribution in *
  + * the LICENSE file.                                                         *
  + *****************************************************************************/
   package org.apache.cocoon.jispstore;
   
   import org.apache.avalon.framework.activity.Disposable;
  @@ -77,7 +77,8 @@
               tmpobject = this.mFsstore.get(key);
               if (tmpobject == null) {
                   if (getLogger().isDebugEnabled()) {
  -                    this.getLogger().debug("Object was NOT found on fs.  Looked for: "
+ key);
  +                    this.getLogger().debug("Object was NOT found on fs. "
  +                                           + "Looked for: " + key);
                   }
                   return null;
               } else {
  @@ -104,9 +105,11 @@
           throws ComponentException {
           this.mComponetManager = manager;
           if (getLogger().isDebugEnabled()) {
  -            getLogger().debug("Looking up " + Store.ROLE + "/JispFilesystemStore");
  +            getLogger().debug("Looking up " 
  +                               + Store.ROLE + "/JispFilesystemStore");
           }
  -        this.mFsstore = (Store) manager.lookup(Store.ROLE + "/JispFilesystemStore");
  +        this.mFsstore = (Store) manager.lookup(Store.ROLE 
  +                                               + "/JispFilesystemStore");
           if (getLogger().isDebugEnabled()) {
               getLogger().debug("Looking up " + StoreJanitor.ROLE);
           }
  @@ -136,7 +139,8 @@
           this.mMaxobjects = params.getParameterAsInteger("maxobjects", 100);
           this.mFilesystem = params.getParameterAsBoolean("filesystem", false);
           if ((this.mMaxobjects < 1)) {
  -            throw new ParameterException("MRUMemoryStore maxobjects must be at least 1
milli second!");
  +            throw new ParameterException("MRUMemoryStore maxobjects must be "
  +                                         + "at least 1 milli second!");
           }
   
           this.mCache = new Hashtable((int) (this.mMaxobjects * 1.2));
  @@ -244,7 +248,8 @@
        */
       public boolean containsKey(Object key) {
           if (mFilesystem) {
  -            return (this.mCache.containsKey(key) || this.mFsstore.containsKey(key));
  +            return (this.mCache.containsKey(key) 
  +                    || this.mFsstore.containsKey(key));
           } else {
               return this.mCache.containsKey(key);
           }
  @@ -293,9 +298,12 @@
               if (getLogger().isDebugEnabled()) {
                   this.getLogger().debug("Object=" + object);
               }
  -            if ((object.getClass().getName().equals("org.apache.cocoon.caching.CachedEventObject"))
  -                     || (object.getClass().getName().equals("org.apache.cocoon.caching.CachedStreamObject"))
  -                     || (ClassUtils.implementsInterface(object.getClass().getName(), "org.apache.cocoon.caching.CacheValidity")))
{
  +            if ((object.getClass().getName().equals(
  +                                "org.apache.cocoon.caching.CachedEventObject"))
  +                     || (object.getClass().getName().equals(
  +                                "org.apache.cocoon.caching.CachedStreamObject"))
  +                     || (ClassUtils.implementsInterface(object.getClass().getName(),
  +                                "org.apache.cocoon.caching.CacheValidity"))) {
                   return true;
               } else {
                   return false;
  
  
  
  1.3       +10 -9     xml-cocoon2/scratchpad/src/org/apache/cocoon/jispstore/FilesystemQueueImpl.java
  
  Index: FilesystemQueueImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/scratchpad/src/org/apache/cocoon/jispstore/FilesystemQueueImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FilesystemQueueImpl.java	2001/12/17 18:09:14	1.2
  +++ FilesystemQueueImpl.java	2001/12/17 18:18:12	1.3
  @@ -1,10 +1,10 @@
  -/**
  - *  Copyright (C) The Apache Software Foundation. All rights reserved. *
  - *  ------------------------------------------------------------------------- *
  - *  This software is published under the terms of the Apache Software License *
  - *  version 1.1, a copy of which has been included with this distribution in *
  - *  the LICENSE file. *
  - */
  +/*****************************************************************************
  + * Copyright (C) The Apache Software Foundation. All rights reserved.        *
  + * ------------------------------------------------------------------------- *
  + * This software is published under the terms of the Apache Software License *
  + * version 1.1, a copy of which has been included  with this distribution in *
  + * the LICENSE file.                                                         *
  + *****************************************************************************/
   package org.apache.cocoon.jispstore;
   
   import org.apache.avalon.framework.activity.Disposable;
  @@ -36,7 +36,7 @@
    *  Every store component can uses this component to store object in the
    *  configured cache directory.
    *
  - * @author Gerhard Froehlich  <a href="mailto:g-froehlich@gmx.de">Gerhard Froehlich</a>
  + * @author Gerhard Froehlich <a href="mailto:g-froehlich@gmx.de">Gerhard Froehlich</a>
    */
   public final class FilesystemQueueImpl
   extends AbstractLoggable
  @@ -232,7 +232,8 @@
   
       private void reportSize() {
           if (this.getLogger().isDebugEnabled() == true) {
  -            this.getLogger().debug("Size of FilesystemQueue=" + this.linkedList.size());
  +            this.getLogger().debug("Size of FilesystemQueue=" 
  +                + this.linkedList.size());
           }
       }
   }
  
  
  
  1.3       +7 -7      xml-cocoon2/scratchpad/src/org/apache/cocoon/jispstore/JispStringKey.java
  
  Index: JispStringKey.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/scratchpad/src/org/apache/cocoon/jispstore/JispStringKey.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JispStringKey.java	2001/12/17 18:09:14	1.2
  +++ JispStringKey.java	2001/12/17 18:18:12	1.3
  @@ -1,10 +1,10 @@
  -/**
  - *  Copyright (C) The Apache Software Foundation. All rights reserved. *
  - *  ------------------------------------------------------------------------- *
  - *  This software is published under the terms of the Apache Software License *
  - *  version 1.1, a copy of which has been included with this distribution in *
  - *  the LICENSE file. *
  - */
  +/*****************************************************************************
  + * Copyright (C) The Apache Software Foundation. All rights reserved.        *
  + * ------------------------------------------------------------------------- *
  + * This software is published under the terms of the Apache Software License *
  + * version 1.1, a copy of which has been included  with this distribution in *
  + * the LICENSE file.                                                         *
  + *****************************************************************************/
   package org.apache.cocoon.jispstore;
   
   import com.coyotegulch.jisp.KeyObject;
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message