You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/09/07 10:58:35 UTC

ignite git commit: IGNITE-843 Fixed server near cache XML and java generation.

Repository: ignite
Updated Branches:
  refs/heads/ignite-843 e22464ca9 -> f34569630


IGNITE-843 Fixed server near cache XML and java generation.


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

Branch: refs/heads/ignite-843
Commit: f3456963069b95c7da0c75629ed9a2bded17fa45
Parents: e22464c
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Mon Sep 7 15:58:49 2015 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Sep 7 15:58:49 2015 +0700

----------------------------------------------------------------------
 modules/control-center-web/src/main/js/db.js          |  1 +
 .../src/main/js/routes/generator/generator-java.js    | 14 +++++++-------
 .../src/main/js/routes/generator/generator-xml.js     | 12 ++++++++----
 3 files changed, 16 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f3456963/modules/control-center-web/src/main/js/db.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/db.js b/modules/control-center-web/src/main/js/db.js
index 216187c..e8eb270 100644
--- a/modules/control-center-web/src/main/js/db.js
+++ b/modules/control-center-web/src/main/js/db.js
@@ -183,6 +183,7 @@ var CacheSchema = new Schema({
     readFromBackup: Boolean,
     copyOnRead: Boolean,
     maxConcurrentAsyncOperations: Number,
+    nearCacheEnabled: Boolean,
     nearConfiguration: {
         nearStartSize: Number,
         nearEvictionPolicy: {

http://git-wip-us.apache.org/repos/asf/ignite/blob/f3456963/modules/control-center-web/src/main/js/routes/generator/generator-java.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/generator/generator-java.js b/modules/control-center-web/src/main/js/routes/generator/generator-java.js
index abb1201..877c10c 100644
--- a/modules/control-center-web/src/main/js/routes/generator/generator-java.js
+++ b/modules/control-center-web/src/main/js/routes/generator/generator-java.js
@@ -291,16 +291,16 @@ $generatorJava.beanProperty = function (res, varName, bean, beanPropName, beanVa
  *
  * @param res Resulting output with generated code.
  * @param varName Current using variable name.
- * @param evictionPolicy Data to add.
- * @param propertyName Name in source data.
+ * @param evtPlc Data to add.
+ * @param propName Name in source data.
  */
-$generatorJava.evictionPolicy = function (res, varName, evictionPolicy, propertyName) {
-    if (evictionPolicy && evictionPolicy.kind) {
-        var evictionPolicyDesc = $generatorCommon.EVICTION_POLICIES[evictionPolicy.kind];
+$generatorJava.evictionPolicy = function (res, varName, evtPlc, propName) {
+    if (evtPlc && evtPlc.kind) {
+        var evictionPolicyDesc = $generatorCommon.EVICTION_POLICIES[evtPlc.kind];
 
-        var obj = evictionPolicy[evictionPolicy.kind.toUpperCase()];
+        var obj = evtPlc[evtPlc.kind.toUpperCase()];
 
-        $generatorJava.beanProperty(res, varName, obj, propertyName, propertyName,
+        $generatorJava.beanProperty(res, varName, obj, propName, propName,
             evictionPolicyDesc.className, evictionPolicyDesc.fields, true);
     }
 };

http://git-wip-us.apache.org/repos/asf/ignite/blob/f3456963/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/generator/generator-xml.js b/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
index a7ad4f5..1f7a30d 100644
--- a/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
+++ b/modules/control-center-web/src/main/js/routes/generator/generator-xml.js
@@ -669,17 +669,21 @@ $generatorXml.cacheServerNearCache = function(cache, res) {
     if (!res)
         res = $generatorCommon.builder();
 
-    if (cache.nearCacheEnabled) {
+    if (cache.cacheMode == 'PARTITIONED' && cache.nearCacheEnabled) {
         res.emptyLineIfNeeded();
 
         res.startBlock('<property name="nearConfiguration">');
         res.startBlock('<bean class="org.apache.ignite.configuration.NearCacheConfiguration">');
 
-        if (cache.nearConfiguration && cache.nearConfiguration.nearStartSize)
-            $generatorXml.property(res, cache.nearConfiguration, 'nearStartSize');
+        if (cache.nearConfiguration) {
+            if (cache.nearConfiguration.nearStartSize)
+                $generatorXml.property(res, cache.nearConfiguration, 'nearStartSize');
+
 
-        if (cache.nearConfiguration && cache.nearConfiguration.nearEvictionPolicy.kind)
             $generatorXml.evictionPolicy(res, cache.nearConfiguration.nearEvictionPolicy, 'nearEvictionPolicy');
+        }
+
+
 
         res.endBlock('</bean>');
         res.endBlock('</property>');