incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject git commit: Removing dup int value.
Date Mon, 02 Mar 2015 01:48:36 GMT
Repository: incubator-blur
Updated Branches:
  refs/heads/master a8413052c -> f05cf0776


Removing dup int value.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/f05cf077
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/f05cf077
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/f05cf077

Branch: refs/heads/master
Commit: f05cf07765ebdb42122ad0405e17d5ef06b4b1be
Parents: a841305
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Sun Mar 1 20:48:25 2015 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sun Mar 1 20:48:25 2015 -0500

----------------------------------------------------------------------
 .../blur/store/blockcache_v2/cachevalue/BaseCacheValue.java  | 2 +-
 .../store/blockcache_v2/cachevalue/UnsafeCacheValue.java     | 8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f05cf077/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/cachevalue/BaseCacheValue.java
----------------------------------------------------------------------
diff --git a/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/cachevalue/BaseCacheValue.java
b/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/cachevalue/BaseCacheValue.java
index 0cef01a..452a0a7 100644
--- a/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/cachevalue/BaseCacheValue.java
+++ b/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/cachevalue/BaseCacheValue.java
@@ -34,7 +34,7 @@ public abstract class BaseCacheValue implements CacheValue {
 
   private static final AtomicLong _neededFinalizedCall = new AtomicLong();
 
-  private final int _length;
+  protected final int _length;
   protected volatile boolean _released = false;
   protected volatile boolean _evicted = false;
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f05cf077/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/cachevalue/UnsafeCacheValue.java
----------------------------------------------------------------------
diff --git a/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/cachevalue/UnsafeCacheValue.java
b/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/cachevalue/UnsafeCacheValue.java
index 6a37916..3b7badb 100644
--- a/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/cachevalue/UnsafeCacheValue.java
+++ b/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/cachevalue/UnsafeCacheValue.java
@@ -62,13 +62,11 @@ public class UnsafeCacheValue extends BaseCacheValue {
   }
 
   private final long _address;
-  private final int _capacity;
 
   public UnsafeCacheValue(int length) {
     super(length);
-    _capacity = length;
-    _address = _unsafe.allocateMemory(_capacity);
-    _offHeapMemorySize.addAndGet(_capacity);
+    _address = _unsafe.allocateMemory(_length);
+    _offHeapMemorySize.addAndGet(_length);
   }
 
   @Override
@@ -95,7 +93,7 @@ public class UnsafeCacheValue extends BaseCacheValue {
     if (!_released) {
       _unsafe.freeMemory(_address);
       _released = true;
-      _offHeapMemorySize.addAndGet(0 - _capacity);
+      _offHeapMemorySize.addAndGet(0 - _length);
     }
   }
 


Mime
View raw message