jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r517626 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle: ./ util/
Date Tue, 13 Mar 2007 10:00:05 GMT
Author: tripod
Date: Tue Mar 13 03:00:04 2007
New Revision: 517626

URL: http://svn.apache.org/viewvc?view=rev&rev=517626
Log:
Fixing some javadoc errors and bean accessors.

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MySqlPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NGKDbNameIndex.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/StringIndex.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java?view=diff&rev=517626&r1=517625&r2=517626
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
Tue Mar 13 03:00:04 2007
@@ -218,7 +218,7 @@
 
     /**
      * Sets the password that will be used to establish JDBC connections.
-     * @param password
+     * @param password the password for the connection
      */
     public void setPassword(String password) {
         this.password = password;
@@ -290,6 +290,14 @@
     }
 
     /**
+     * Returns if uses external (filesystem) blob store.
+     * @return if uses external (filesystem) blob store.
+     */
+    public String getExternalBLOBs() {
+        return String.valueOf(externalBLOBs);
+    }
+
+    /**
      * Sets the flag for external (filsystem) blob store usage.
      * @param externalBLOBs a value of "true" indicates that an external blob
      *        store is to be used.
@@ -315,18 +323,18 @@
     }
 
     /**
-     * Returns the miminum blob size.
-     * @return the miminum blob size.
+     * Returns the miminum blob size in bytes.
+     * @return the miminum blob size in bytes.
      */
-    public int getMinBlobSize() {
-        return minBlobSize;
+    public String getMinBlobSize() {
+        return String.valueOf(minBlobSize);
     }
 
     /**
      * Sets the minumum blob size. This size defines the threshhold of which
      * size a property is included in the bundle or is stored in the blob store.
      *
-     * @param minBlobSize
+     * @param minBlobSize the minimum blobsize in bytes.
      */
     public void setMinBlobSize(String minBlobSize) {
         this.minBlobSize = Integer.decode(minBlobSize).intValue();
@@ -336,7 +344,7 @@
      * Sets the error handling behaviour of this manager. See {@link ErrorHandling}
      * for details about the flags.
      *
-     * @param errorHandling
+     * @param errorHandling the error handling flags
      */
     public void setErrorHandling(String errorHandling) {
         this.errorHandling = new ErrorHandling(errorHandling);
@@ -369,6 +377,9 @@
     /**
      * Checks if the required schema objects exist and creates them if they
      * don't exist yet.
+     *
+     * @throws SQLException if an SQL error occurs.
+     * @throws RepositoryException if an error occurs.
      */
     protected void checkSchema() throws SQLException, RepositoryException {
         DatabaseMetaData metaData = con.getMetaData();
@@ -481,6 +492,7 @@
         // in order to re-register the driver in the DriverManager after a
         // repository shutdown.
         Driver drv = (Driver) Class.forName(driver).newInstance();
+        log.info("JDBC driver created: {}", drv);
         con = DriverManager.getConnection(url, user, password);
         con.setAutoCommit(true);
 
@@ -529,7 +541,7 @@
     /**
      * Creates a suitable blobstore
      * @return a blobstore
-     * @throws Exception
+     * @throws Exception if an unspecified error occurs
      */
     protected CloseableBLOBStore createBlobStore() throws Exception {
         if (useLocalFsBlobStore()) {
@@ -582,7 +594,7 @@
      * Creates a blob store that is based on a local fs. This is called by
      * init if {@link #useLocalFsBlobStore()} returns <code>true</code>.
      *
-     * @param context
+     * @param context the persistence manager context
      * @return a blob store
      * @throws Exception if an error occurs.
      */
@@ -602,7 +614,8 @@
      * Creates a blob store that uses the database. This is called by
      * init if {@link #useDbBlobStore()} returns <code>true</code>.
      *
-     * @param context
+     * @param context the persistence manager context
+     *
      * @return a blob store
      * @throws Exception if an error occurs.
      */
@@ -762,11 +775,11 @@
      * Sets the key parameters to the prepared statement, starting at
      * <code>pos</code> and returns the number of key parameters + pos.
      *
-     * @param stmt
-     * @param uuid
-     * @param pos
+     * @param stmt the statement
+     * @param uuid the uuid of the key
+     * @param pos the position of the key parameter
      * @return the number of key parameters + <code>pos</code>
-     * @throws SQLException
+     * @throws SQLException if an SQL error occurs.
      */
     protected int setKey(PreparedStatement stmt, UUID uuid, int pos)
             throws SQLException {
@@ -1053,7 +1066,7 @@
 
     /**
      * closes the input stream
-     * @param ins
+     * @param ins the inputs stream
      */
     protected void closeStream(InputStream ins) {
         if (ins != null) {
@@ -1067,7 +1080,7 @@
 
     /**
      * closes the statement
-     * @param stmt
+     * @param stmt the statemenet
      */
     protected void closeStatement(PreparedStatement stmt) {
         if (stmt != null) {
@@ -1081,8 +1094,8 @@
 
     /**
      * logs an sql exception
-     * @param message
-     * @param se
+     * @param message the message
+     * @param se the exception
      */
     protected void logException(String message, SQLException se) {
         if (message != null) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.java?view=diff&rev=517626&r1=517625&r2=517626
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.java
Tue Mar 13 03:00:04 2007
@@ -34,12 +34,6 @@
  * Configuration:<br>
  * <ul>
  * <li>&lt;param name="{@link #setBundleCacheSize(String) bundleCacheSize}" value="8"/>
- * <li>&lt;param name="{@link #setBlobFSBlockSize(String) blobFSBlockSize}" value="0"/>
- * <li>&lt;param name="{@link #setBlobFSInitialCacheSize(String) blobFSInitialCacheSize}"
value="100"/>
- * <li>&lt;param name="{@link #setBlobFSMaximumCacheSize(String) blobFSMaximumCacheSize}"
value="4000"/>
- * <li>&lt;param name="{@link #setBlobFSLogBufferCache(String) blobFSLogBufferCache}"
value="false"/>
- * <li>&lt;param name="{@link #setBlobFSLogIOCalls(String) blobFSLogIOCalls}" value="false"/>
- * <li>&lt;param name="{@link #setBlobFSLogSYSCalls(String) blobFSLogSYSCalls}"
value="false"/>
  * <li>&lt;param name="{@link #setConsistencyCheck(String) consistencyCheck}" value="false"/>
  * <li>&lt;param name="{@link #setMinBlobSize(String) minBlobSize}" value="16384"/>
  * <li>&lt;param name="{@link #setDriver(String) driver}" value="org.apache.derby.jdbc.EmbeddedDriver"/>
@@ -118,7 +112,8 @@
      * requested number of pages, as long as they allocate at least one page.
      * <p/>
      * Default is <code>16</code>
-     * @param derbyStorageInitialPages
+     *
+     * @param derbyStorageInitialPages the number of initial pages
      */
     public void setDerbyStorageInitialPages(String derbyStorageInitialPages) {
         this.derbyStorageInitialPages =
@@ -146,7 +141,7 @@
      * <p/>
      * Default is <code>256</code>
      *
-     * @param derbyStorageMinimumRecordSize
+     * @param derbyStorageMinimumRecordSize the minimum record size
      */
     public void setDerbyStorageMinimumRecordSize(String derbyStorageMinimumRecordSize) {
         this.derbyStorageMinimumRecordSize =
@@ -183,7 +178,7 @@
      * Default is <code>1024</code> (which gives about 16mb memory usage given
      * the default of 16384 as page size).
      *
-     * @param derbyStoragePageCacheSize
+     * @param derbyStoragePageCacheSize the page cache size
      */
     public void setDerbyStoragePageCacheSize(String derbyStoragePageCacheSize) {
         this.derbyStoragePageCacheSize =
@@ -214,7 +209,7 @@
      * <p/>
      * Default is <code>20%</code>
      *
-     * @param derbyStoragePageReservedSpace
+     * @param derbyStoragePageReservedSpace the page reserved space
      */
     public void setDerbyStoragePageReservedSpace(String derbyStoragePageReservedSpace) {
         this.derbyStoragePageReservedSpace =
@@ -238,7 +233,7 @@
      * <p/>
      * Default is <code>16384</code>
      *
-     * @param derbyStoragePageSize
+     * @param derbyStoragePageSize the storage page size
      */
     public void setDerbyStoragePageSize(String derbyStoragePageSize) {
         this.derbyStoragePageSize = Integer.decode(derbyStoragePageSize).intValue();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java?view=diff&rev=517626&r1=517625&r2=517626
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java
Tue Mar 13 03:00:04 2007
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.core.persistence.bundle;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jackrabbit.core.persistence.PMContext;
 import org.apache.jackrabbit.core.persistence.PersistenceManager;
 
@@ -32,12 +30,6 @@
  * Configuration:<br>
  * <ul>
  * <li>&lt;param name="{@link #setBundleCacheSize(String) bundleCacheSize}" value="8"/>
- * <li>&lt;param name="{@link #setBlobFSBlockSize(String) blobFSBlockSize}" value="0"/>
- * <li>&lt;param name="{@link #setBlobFSInitialCacheSize(String) blobFSInitialCacheSize}"
value="100"/>
- * <li>&lt;param name="{@link #setBlobFSMaximumCacheSize(String) blobFSMaximumCacheSize}"
value="4000"/>
- * <li>&lt;param name="{@link #setBlobFSLogBufferCache(String) blobFSLogBufferCache}"
value="false"/>
- * <li>&lt;param name="{@link #setBlobFSLogIOCalls(String) blobFSLogIOCalls}" value="false"/>
- * <li>&lt;param name="{@link #setBlobFSLogSYSCalls(String) blobFSLogSYSCalls}"
value="false"/>
  * <li>&lt;param name="{@link #setConsistencyCheck(String) consistencyCheck}" value="false"/>
  * <li>&lt;param name="{@link #setMinBlobSize(String) minBlobSize}" value="16384"/>
  * <li>&lt;param name="{@link #setDriver(String) driver}" value="org.hsqldb.jdbcDriver"/>
@@ -54,11 +46,6 @@
 
     /** the cvs/svn id */
     static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
-    /**
-     * the default logger
-     */
-    private static Logger log = LoggerFactory.getLogger(H2PersistenceManager.class);
 
     /** the lock time out. see*/
     private long lockTimeout = 10000;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java?view=diff&rev=517626&r1=517625&r2=517626
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java
Tue Mar 13 03:00:04 2007
@@ -24,12 +24,6 @@
  * Configuration:<br>
  * <ul>
  * <li>&lt;param name="{@link #setBundleCacheSize(String) bundleCacheSize}" value="8"/>
- * <li>&lt;param name="{@link #setBlobFSBlockSize(String) blobFSBlockSize}" value="0"/>
- * <li>&lt;param name="{@link #setBlobFSInitialCacheSize(String) blobFSInitialCacheSize}"
value="100"/>
- * <li>&lt;param name="{@link #setBlobFSMaximumCacheSize(String) blobFSMaximumCacheSize}"
value="4000"/>
- * <li>&lt;param name="{@link #setBlobFSLogBufferCache(String) blobFSLogBufferCache}"
value="false"/>
- * <li>&lt;param name="{@link #setBlobFSLogIOCalls(String) blobFSLogIOCalls}" value="false"/>
- * <li>&lt;param name="{@link #setBlobFSLogSYSCalls(String) blobFSLogSYSCalls}"
value="false"/>
  * <li>&lt;param name="{@link #setConsistencyCheck(String) consistencyCheck}" value="false"/>
  * <li>&lt;param name="{@link #setMinBlobSize(String) minBlobSize}" value="16384"/>
  * <li>&lt;param name="{@link #setDriver(String) driver}" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MySqlPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MySqlPersistenceManager.java?view=diff&rev=517626&r1=517625&r2=517626
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MySqlPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MySqlPersistenceManager.java
Tue Mar 13 03:00:04 2007
@@ -24,12 +24,6 @@
  * Configuration:<br>
  * <ul>
  * <li>&lt;param name="{@link #setBundleCacheSize(String) bundleCacheSize}" value="8"/>
- * <li>&lt;param name="{@link #setBlobFSBlockSize(String) blobFSBlockSize}" value="0"/>
- * <li>&lt;param name="{@link #setBlobFSInitialCacheSize(String) blobFSInitialCacheSize}"
value="100"/>
- * <li>&lt;param name="{@link #setBlobFSMaximumCacheSize(String) blobFSMaximumCacheSize}"
value="4000"/>
- * <li>&lt;param name="{@link #setBlobFSLogBufferCache(String) blobFSLogBufferCache}"
value="false"/>
- * <li>&lt;param name="{@link #setBlobFSLogIOCalls(String) blobFSLogIOCalls}" value="false"/>
- * <li>&lt;param name="{@link #setBlobFSLogSYSCalls(String) blobFSLogSYSCalls}"
value="false"/>
  * <li>&lt;param name="{@link #setConsistencyCheck(String) consistencyCheck}" value="false"/>
  * <li>&lt;param name="{@link #setMinBlobSize(String) minBlobSize}" value="16384"/>
  * <li>&lt;param name="{@link #setDriver(String) driver}" value="org.gjt.mm.mysql.Drive"/>

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java?view=diff&rev=517626&r1=517625&r2=517626
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java
Tue Mar 13 03:00:04 2007
@@ -61,7 +61,8 @@
      * @param nsIndex the namespace index
      * @param nameIndex the name index
      */
-    public BundleBinding(ErrorHandling errorHandling, BLOBStore blobStore, StringIndex nsIndex,
StringIndex nameIndex) {
+    public BundleBinding(ErrorHandling errorHandling, BLOBStore blobStore,
+                         StringIndex nsIndex, StringIndex nameIndex) {
         super(errorHandling, blobStore, nsIndex, nameIndex);
     }
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NGKDbNameIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NGKDbNameIndex.java?view=diff&rev=517626&r1=517625&r2=517626
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NGKDbNameIndex.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NGKDbNameIndex.java
Tue Mar 13 03:00:04 2007
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.core.persistence.bundle.util;
 
-import org.apache.jackrabbit.core.persistence.bundle.util.DbNameIndex;
-
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.sql.Connection;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/StringIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/StringIndex.java?view=diff&rev=517626&r1=517625&r2=517626
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/StringIndex.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/StringIndex.java
Tue Mar 13 03:00:04 2007
@@ -17,15 +17,31 @@
 package org.apache.jackrabbit.core.persistence.bundle.util;
 
 /**
- * This Interface defines...
+ * The <code>StringIndex</code> defines a very simple interface that mapps
+ * strings to an integer and vice versa. the mapping must be unique and
+ * stable across repository restarts.
  */
 public interface StringIndex {
 
     /** the cvs/svn id */
     static final String CVS_ID = "$URL$ $Rev$ $Date$";
 
+    /**
+     * Returns the index for a given string. if the string does not exist in
+     * the underlying index map a new index needs to be created.
+     *
+     * @param string the string to return the index for
+     * @return the index of that string.
+     */
     public int stringToIndex(String string);
 
+    /**
+     * Returns the string for a given index. if the index does not exist in the
+     * underlying index map, <code>null</code> is returned.
+     *
+     * @param idx the index tp returns the string for.
+     * @return the string or <code>null</code>
+     */
     public String indexToString(int idx);
 
 }



Mime
View raw message