ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [2/3] incubator-ignite git commit: IGNITE-843: WIP Generate cache type metadata configs.
Date Mon, 27 Jul 2015 11:15:14 GMT
IGNITE-843: WIP Generate cache type metadata configs.


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

Branch: refs/heads/ignite-1121
Commit: ee6fa094bd1eaf8bf77a3c53f6ecfed89366f3d2
Parents: e0d3f7c
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Mon Jul 27 11:36:59 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Mon Jul 27 11:36:59 2015 +0700

----------------------------------------------------------------------
 modules/web-control-center/src/main/js/db.js    |  4 +--
 .../src/main/js/routes/generator/xml.js         | 29 +++++++++++++++++++-
 2 files changed, 30 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ee6fa094/modules/web-control-center/src/main/js/db.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/db.js b/modules/web-control-center/src/main/js/db.js
index b0b7053..84947e5 100644
--- a/modules/web-control-center/src/main/js/db.js
+++ b/modules/web-control-center/src/main/js/db.js
@@ -124,7 +124,7 @@ var CacheSchema = new Schema({
     rebalanceTimeout: Number,
     rebalanceThrottle: Number,
 
-    storeMetadatas: [{type: ObjectId, ref: 'CacheTypeMetadata'}],
+    storeMetadata: [{type: ObjectId, ref: 'CacheTypeMetadata'}],
     cacheStoreFactory: {
         kind: {
             type: String,
@@ -168,7 +168,7 @@ var CacheSchema = new Schema({
     sqlEscapeAll: Boolean,
     sqlOnheapRowCacheSize: Number,
     longQueryWarningTimeout: Number,
-    queryMetadatas: [{type: ObjectId, ref: 'CacheTypeMetadata'}],
+    queryMetadata: [{type: ObjectId, ref: 'CacheTypeMetadata'}],
     indexedTypes: [{keyClass: String, valueClass: String}],
     sqlFunctionClasses: [String],
     statisticsEnabled: Boolean,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ee6fa094/modules/web-control-center/src/main/js/routes/generator/xml.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/src/main/js/routes/generator/xml.js b/modules/web-control-center/src/main/js/routes/generator/xml.js
index 16ef23b..7c18655 100644
--- a/modules/web-control-center/src/main/js/routes/generator/xml.js
+++ b/modules/web-control-center/src/main/js/routes/generator/xml.js
@@ -337,6 +337,19 @@ function createEvictionPolicy(res, evictionPolicy, propertyName) {
     }
 }
 
+function generateCacheTypeMetadataConfiguration(metaCfg, res) {
+    if (!res)
+        res = generatorUtils.builder();
+
+    res.startBlock('<bean class="org.apache.ignite.cache.CacheTypeMetadata">');
+
+
+
+    res.endBlock('</bean>');
+
+    return res;
+}
+
 function generateCacheConfiguration(cacheCfg, res) {
     if (!res)
         res = generatorUtils.builder();
@@ -464,7 +477,21 @@ function generateCacheConfiguration(cacheCfg, res) {
     res.needEmptyLine = true;
 
     addProperty(res, cacheCfg, 'maxConcurrentAsyncOperations');
-    
+
+    // Generate cache type metadata configs.
+    if ((cacheCfg.queryMetadata && cacheCfg.queryMetadata.length > 0) ||
+        (cacheCfg.storeMetadata && cacheCfg.storeMetadata.length > 0)) {
+        res.emptyLineIfNeeded();
+
+        res.startBlock('<property name="typeMetadata">');
+        res.startBlock('<list>');
+
+        // TODO
+
+        res.endBlock('</list>');
+        res.endBlock('</property');
+    }
+
     res.endBlock('</bean>');
 
     return res;


Mime
View raw message