usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [10/12] usergrid git commit: Fix cache maximum settings.
Date Mon, 16 May 2016 15:48:52 GMT
Fix cache maximum settings.


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

Branch: refs/heads/usergrid-1268-akka-211
Commit: cdb92aa7ea0d02e02b7ec377889598dac3cce69f
Parents: f723f36
Author: Michael Russo <mrusso@apigee.com>
Authored: Wed May 11 14:26:10 2016 +0800
Committer: Michael Russo <mrusso@apigee.com>
Committed: Wed May 11 14:26:10 2016 +0800

----------------------------------------------------------------------
 .../org/apache/usergrid/security/shiro/utils/LocalShiroCache.java  | 2 +-
 .../services/notifications/ApplicationQueueManagerCache.java       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/cdb92aa7/stack/services/src/main/java/org/apache/usergrid/security/shiro/utils/LocalShiroCache.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/security/shiro/utils/LocalShiroCache.java
b/stack/services/src/main/java/org/apache/usergrid/security/shiro/utils/LocalShiroCache.java
index 019a457..16e4340 100644
--- a/stack/services/src/main/java/org/apache/usergrid/security/shiro/utils/LocalShiroCache.java
+++ b/stack/services/src/main/java/org/apache/usergrid/security/shiro/utils/LocalShiroCache.java
@@ -54,7 +54,7 @@ public class LocalShiroCache<K, V> {
         }
 
         this.cache = CacheBuilder.newBuilder()
-            .maximumSize(Math.max(1000,configuredMaxSize))
+            .maximumSize(Math.min(1000,configuredMaxSize))
             .expireAfterWrite(ttl, TimeUnit.SECONDS).build();
 
     }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/cdb92aa7/stack/services/src/main/java/org/apache/usergrid/services/notifications/ApplicationQueueManagerCache.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/notifications/ApplicationQueueManagerCache.java
b/stack/services/src/main/java/org/apache/usergrid/services/notifications/ApplicationQueueManagerCache.java
index 555e495..2ef567d 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/notifications/ApplicationQueueManagerCache.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/notifications/ApplicationQueueManagerCache.java
@@ -61,7 +61,7 @@ public class ApplicationQueueManagerCache{
         }
 
         this.cache = CacheBuilder.newBuilder()
-            .maximumSize(Math.max(1000,configuredMaxSize))
+            .maximumSize(Math.min(1000,configuredMaxSize))
             .expireAfterWrite(ttl, TimeUnit.MINUTES)
             .removalListener(new RemovalListener<UUID, ApplicationQueueManager>() {
                 @Override


Mime
View raw message