jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r418287 - in /jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state: ItemState.java MLRUItemStateCache.java NodeState.java PropertyState.java
Date Fri, 30 Jun 2006 13:59:08 GMT
Author: tripod
Date: Fri Jun 30 06:59:08 2006
New Revision: 418287

URL: http://svn.apache.org/viewvc?rev=418287&view=rev
Log:
JCR-471: Create resource sensitive cache for item states

Modified:
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/ItemState.java
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/MLRUItemStateCache.java
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/NodeState.java
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/PropertyState.java

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/ItemState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/ItemState.java?rev=418287&r1=418286&r2=418287&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/ItemState.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/ItemState.java
Fri Jun 30 06:59:08 2006
@@ -450,12 +450,12 @@
     }
 
     /**
-     * Returns the approximate memory consuption of this state.
+     * Returns the approximate memory consumption of this state.
      *
-     * @return the approximate memory consuption of this state.
+     * @return the approximate memory consumption of this state.
      */
-    public abstract long getMemoryConsumption();
-    
+    public abstract long calculateMemoryFootprint();
+
     //----------------------------------------------------< ItemStateListener >
     /**
      * {@inheritDoc}

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/MLRUItemStateCache.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/MLRUItemStateCache.java?rev=418287&r1=418286&r2=418287&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/MLRUItemStateCache.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/MLRUItemStateCache.java
Fri Jun 30 06:59:08 2006
@@ -1,16 +1,18 @@
 /*
- * $URL$
- * $Id$
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2006 Day Management AG
- * Barfuesserplatz 6, 4001 Basel, Switzerland
- * All Rights Reserved.
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * This software is the confidential and proprietary information of
- * Day Management AG, ("Confidential Information"). You shall not
- * disclose such Confidential Information and shall use it only in
- * accordance with the terms of the license agreement you entered into
- * with Day.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.apache.jackrabbit.core.state;
 
@@ -193,7 +195,7 @@
 
         public Entry(ItemState state) {
             this.state = state;
-            this.size = 64 + state.getMemoryConsumption();
+            this.size = 64 + state.calculateMemoryFootprint();
         }
     }
 }

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/NodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/NodeState.java?rev=418287&r1=418286&r2=418287&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/NodeState.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/NodeState.java
Fri Jun 30 06:59:08 2006
@@ -777,7 +777,7 @@
     /**
      * {@inheritDoc}
      */
-    public long getMemoryConsumption() {
+    public long calculateMemoryFootprint() {
         /*
         private QName nodeTypeName;
         private Set mixinTypeNames = Collections.EMPTY_SET;

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/PropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/PropertyState.java?rev=418287&r1=418286&r2=418287&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/PropertyState.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/PropertyState.java
Fri Jun 30 06:59:08 2006
@@ -229,7 +229,7 @@
     /**
      * {@inheritDoc}
      */
-    public long getMemoryConsumption() {
+    public long calculateMemoryFootprint() {
         /*
         private PropertyId id;
         private InternalValue[] values;



Mime
View raw message