Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 60847 invoked from network); 3 Dec 2007 10:22:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Dec 2007 10:22:53 -0000 Received: (qmail 6088 invoked by uid 500); 3 Dec 2007 10:22:38 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 6058 invoked by uid 500); 3 Dec 2007 10:22:37 -0000 Mailing-List: contact commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list commits@jackrabbit.apache.org Received: (qmail 6038 invoked by uid 99); 3 Dec 2007 10:22:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Dec 2007 02:22:37 -0800 X-ASF-Spam-Status: No, hits=-98.9 required=10.0 tests=ALL_TRUSTED,FB_GET_MEDS X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Dec 2007 10:22:25 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9F2D21A9832; Mon, 3 Dec 2007 02:22:28 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r600468 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java Date: Mon, 03 Dec 2007 10:22:28 -0000 To: commits@jackrabbit.apache.org From: thomasm@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071203102228.9F2D21A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: thomasm Date: Mon Dec 3 02:22:27 2007 New Revision: 600468 URL: http://svn.apache.org/viewvc?rev=600468&view=rev Log: JCR-1252 BundleFsPersistenceManager: remove deprecated settings Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java?rev=600468&r1=600467&r2=600468&view=diff ============================================================================== --- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java (original) +++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java Mon Dec 3 02:22:27 2007 @@ -56,13 +56,7 @@ *

* Configuration:
*

    - *
  • <param name="{@link #setBundleCacheSize(String) bundleCacheSize}" value="8"/> *
  • <param name="{@link #setBlobFSBlockSize(String) blobFSBlockSize}" value="0"/> - *
  • <param name="{@link #setBlobFSInitialCacheSize(String) blobFSInitialCacheSize}" value="100"/> - *
  • <param name="{@link #setBlobFSMaximumCacheSize(String) blobFSMaximumCacheSize}" value="4000"/> - *
  • <param name="{@link #setItemFSBlockSize(String) blobFSBlockSize}" value="0"/> - *
  • <param name="{@link #setItemFSInitialCacheSize(String) blobFSInitialCacheSize}" value="100"/> - *
  • <param name="{@link #setItemFSMaximumCacheSize(String) blobFSMaximumCacheSize}" value="4000"/> *
  • <param name="{@link #setMinBlobSize(String) minBlobSize}" value="4096"/> *
  • <param name="{@link #setErrorHandling(String) errorHandling}" value=""/> *
@@ -78,9 +72,6 @@ /** flag indicating if this manager was initialized */ protected boolean initialized = false; - /** initial size of buffer used to serialize objects */ - protected static final int INITIAL_BUFFER_SIZE = 1024; - /** file system where BLOB data is stored */ protected BundleFsPersistenceManager.CloseableBLOBStore blobStore; @@ -91,36 +82,6 @@ private int blobFSBlockSize = 0; /** - * Default initial cache size for BLOB filesystem: 100, req. 25KB - * @see #setBlobFSInitialCacheSize(String) - */ - private int blobFSInitialCache = 100; - - /** - * Default max cache size for BLOB filesystem: 4000, req. 1000KB - * @see #setBlobFSMaximumCacheSize(String) - */ - private int blobFSMaximumCache = 4000; - - /** - * Default blocksize for item filesystem: - * @see #setItemFSBlockSize(String) - */ - private int itemFSBlockSize = 0; - - /** - * Default initial cache size for item filesystem: 100, req. 25KB - * @see #setItemFSInitialCacheSize(String) - */ - private int itemFSInitialCache = 100; - - /** - * Default max cache size for item filesystem: 4000, req. 1000KB - * @see #setItemFSMaximumCacheSize(String) - */ - private int itemFSMaximumCache = 4000; - - /** * the minimum size of a property until it gets written to the blob store * @see #setMinBlobSize(String) */ @@ -158,17 +119,9 @@ /** * Sets the block size of the blob fs and controls how blobs are handled. *
- * If the size is > 0, it must be a power of 2 and is used as blocksize - * for the cqfs. blobs are then stored within that cqfs. A call to - * {@link #useCqFsBlobStore()} will return true. - *
- * If the size is 0, the cqfs is not used at all, and the blobs are stored - * within the workspace's physical filesystem. A call to - * {@link #useLocalFsBlobStore()} will return true. + * If the size is 0, the blobs are stored within the workspace's physical filesystem. *
- * If the size is < 0, the cqfs is not used at all, and the blobs are - * stored within the item filesystem. A call to - * {@link #useItemBlobStore()} will return true. + * Otherwise, the blobs are stored within the item filesystem. *
* Please note that not all binary properties are considered as blobs. They * are only stored in the respective blob store, if their size exceeds @@ -181,14 +134,6 @@ } /** - * Returns true if the blobs are stored in the DB. - * @return true if the blobs are stored in the DB. - */ - public boolean useItemBlobStore() { - return blobFSBlockSize < 0; - } - - /** * Returns true if the blobs are stored in the local fs. * @return true if the blobs are stored in the local fs. */ @@ -197,109 +142,6 @@ } /** - * Returns true if the blobs are stored in the cqfs. - * @return true if the blobs are stored in the cqfs. - */ - public boolean useCqFsBlobStore() { - return blobFSBlockSize > 0; - } - - /** - * Returns the configured initial cache size of the blobfs. - * @return the configured initial cache size of the blobfs. - */ - public String getBlobFSInitialCacheSize() { - return String.valueOf(blobFSInitialCache); - } - - /** - * Sets the initial cache size of the blob fs. This only applies to cqfs - * base blobstores, i.e. if {@link #useCqFsBlobStore()} returns - * true. - * @param size the initial size - */ - public void setBlobFSInitialCacheSize(String size) { - this.blobFSInitialCache = Integer.decode(size).intValue(); - } - - /** - * Returns the configured maximal size of the blobfs. - * @return the configured maximal size of the blobfs. - */ - public String getBlobFSMaximumCacheSize() { - return String.valueOf(blobFSMaximumCache); - } - - /** - * Sets the maximal cache size of the blob fs. This only applies to cqfs - * base blobstores, i.e. if {@link #useCqFsBlobStore()} returns - * true. - * @param size the maximal size - */ - public void setBlobFSMaximumCacheSize(String size) { - this.blobFSMaximumCache = Integer.decode(size).intValue(); - } - - - /** - * Returns the configured block size of the item cqfs - * @return the block size. - */ - public String getItemFSBlockSize() { - return String.valueOf(itemFSBlockSize); - } - - /** - * Sets the block size of the item fs. - *
- * If the size is > 0, it must be a power of 2 and is used as blocksize - * for the cqfs. items are then stored within that cqfs. - *
- * If the size is 0, the cqfs is not used at all, and the items are stored - * within the workspace's physical filesystem. - * - * @param size the block size - */ - public void setItemFSBlockSize(String size) { - this.itemFSBlockSize = Integer.decode(size).intValue(); - } - - /** - * Returns the configured initial cache size of the itemfs. - * @return the configured initial cache size of the itemfs. - */ - public String getItemFSInitialCacheSize() { - return String.valueOf(itemFSInitialCache); - } - - /** - * Sets the initial cache size of the item fs. This only applies to cqfs - * based item stores. - * - * @param size the initial size - */ - public void setItemFSInitialCacheSize(String size) { - this.itemFSInitialCache = Integer.decode(size).intValue(); - } - - /** - * Returns the configured maximal size of the itemfs. - * @return the configured maximal size of the itemfs. - */ - public String getItemFSMaximumCacheSize() { - return String.valueOf(itemFSMaximumCache); - } - - /** - * Sets the maximal cache size of the item fs. This only applies to cqfs - * base item store. - * @param size the maximal size - */ - public void setItemFSMaximumCacheSize(String size) { - this.itemFSMaximumCache = Integer.decode(size).intValue(); - } - - /** * Returns the mininum blob size. * @return the mininum blob size. */ @@ -310,6 +152,7 @@ /** * Sets the minimum blob size. This size defines the threshold of which * size a property is included in the bundle or is stored in the blob store. + * Very high values decrease the performance. * * @param minBlobSize */ @@ -347,21 +190,7 @@ this.name = context.getHomeDir().getName(); // create item fs - if (itemFSBlockSize == 0) { - itemFs = new BasedFileSystem(context.getFileSystem(), "items"); - } else { - /* - CQFileSystem cqfs = new CQFileSystem(); - cqfs.setPath(new File(context.getHomeDir(), "items.dat").getCanonicalPath()); - cqfs.setAutoRepair(false); - cqfs.setAutoSync(false); - cqfs.setBlockSize(itemFSBlockSize); - cqfs.setCacheInitialBlocks(itemFSInitialCache); - cqfs.setCacheMaximumBlocks(itemFSMaximumCache); - cqfs.init(); - itemFs = cqfs; - */ - } + itemFs = new BasedFileSystem(context.getFileSystem(), "items"); // create correct blob store if (useLocalFsBlobStore()) { @@ -369,10 +198,8 @@ blobFS.setRoot(new File(context.getHomeDir(), "blobs")); blobFS.init(); blobStore = new BundleFsPersistenceManager.FSBlobStore(blobFS); - } else if (useItemBlobStore()) { + } else { blobStore = new BundleFsPersistenceManager.FSBlobStore(itemFs); - } else /* useCqFsBlobStore() */ { -//blobStore = createCQFSBlobStore(context); } // load namespaces