ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject incubator-ignite git commit: # IGNITE-843 Fix after DB schema changes
Date Wed, 24 Jun 2015 06:52:43 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 ea44d6e5f -> 56d8c671e


# IGNITE-843 Fix after DB schema changes


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

Branch: refs/heads/ignite-843
Commit: 56d8c671ee76b2ab2426022b43278442e749ef60
Parents: ea44d6e
Author: sevdokimov <sergey.evdokimov@jetbrains.com>
Authored: Wed Jun 24 09:52:34 2015 +0300
Committer: sevdokimov <sergey.evdokimov@jetbrains.com>
Committed: Wed Jun 24 09:52:34 2015 +0300

----------------------------------------------------------------------
 modules/webconfig/nodejs/utils/generatorJava.js | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56d8c671/modules/webconfig/nodejs/utils/generatorJava.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/utils/generatorJava.js b/modules/webconfig/nodejs/utils/generatorJava.js
index 7cf66ef..4386694 100644
--- a/modules/webconfig/nodejs/utils/generatorJava.js
+++ b/modules/webconfig/nodejs/utils/generatorJava.js
@@ -203,10 +203,10 @@ exports.generateClusterConfiguration = function(cluster) {
 };
 
 var evictionPolicies = {
-    'LRU': {shortClassName: 'LruEvictionPolicy', fields: {batchSize: null, maxMemorySize:
null}},
-    'RND': {shortClassName: 'RandomEvictionPolicy', fields: {batchSize: null}},
-    'FIFO': {shortClassName: 'FifoEvictionPolicy', fields: {batchSize: null}},
-    'SORTED': {shortClassName: 'SortedEvictionPolicy', fields: {batchSize: null}}
+    'LRU': {shortClassName: 'LruEvictionPolicy', fields: {batchSize: null, maxMemorySize:
null, maxSize: null}},
+    'RND': {shortClassName: 'RandomEvictionPolicy', fields: {maxSize: null}},
+    'FIFO': {shortClassName: 'FifoEvictionPolicy', fields: {batchSize: null, maxMemorySize:
null, maxSize: null}},
+    'SORTED': {shortClassName: 'SortedEvictionPolicy', fields: {batchSize: null, maxMemorySize:
null, maxSize: null}}
 };
 
 exports.generateCacheConfiguration = function(cacheCfg, varName, res) {
@@ -234,7 +234,7 @@ exports.generateCacheConfiguration = function(cacheCfg, varName, res)
{
 
     res.needEmptyLine = true;
     
-    if (cacheCfg.evictionPolicy) {
+    if (cacheCfg.evictionPolicy && cacheCfg.evictionPolicy.kind) {
         var e = evictionPolicies[cacheCfg.evictionPolicy.kind];
 
         addBeanWithProperties(res, cacheCfg.evictionPolicy[cacheCfg.evictionPolicy.kind.toUpperCase()],
varName, 
@@ -246,9 +246,12 @@ exports.generateCacheConfiguration = function(cacheCfg, varName, res)
{
     addBeanWithProperties(res, cacheCfg.nearConfiguration, varName, 'nearConfiguration',
'nearConfiguration',
         'NearCacheConfiguration', {nearStartSize: null, atomicSequenceReserveSize: null},
true);
     
-    if (cacheCfg.nearConfiguration && cacheCfg.nearConfiguration.nearEvictionPolicy)
{
-        res.line('nearConfiguration.setNearEvictionPolicy(new ' 
-            + evictionPolicies[cacheCfg.nearConfiguration.nearEvictionPolicy].shortClassName
+ '());');
+    if (cacheCfg.nearConfiguration && cacheCfg.nearConfiguration.nearEvictionPolicy
&& cacheCfg.nearConfiguration.nearEvictionPolicy.kind) {
+        var evictionPolicy = cacheCfg.nearConfiguration.nearEvictionPolicy;
+        e = evictionPolicies[evictionPolicy.kind];
+        
+        addBeanWithProperties(res, evictionPolicy[evictionPolicy.kind.toUpperCase()], 'nearConfiguration',
+            'nearEvictionPolicy', 'nearEvictionPolicy', e.shortClassName, e.fields, true);
     }
 
     res.needEmptyLine = true;


Mime
View raw message