You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/09/03 14:50:59 UTC
ignite git commit: IGNITE-1364: Grid -> Ignite.
Repository: ignite
Updated Branches:
refs/heads/ignite-1364 6b9ec314b -> 4aead3268
IGNITE-1364: Grid -> Ignite.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4aead326
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4aead326
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4aead326
Branch: refs/heads/ignite-1364
Commit: 4aead3268dd8d06663c500342ad4417ddf63c4ef
Parents: 6b9ec31
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Sep 3 15:51:36 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Sep 3 15:51:36 2015 +0300
----------------------------------------------------------------------
.../cpp/common/include/ignite/common/exports.h | 8 +-
.../cpp/common/include/ignite/common/java.h | 16 +-
.../src/main/cpp/common/src/exports.cpp | 16 +-
.../platform/src/main/cpp/common/src/java.cpp | 45 +++---
.../main/cpp/core-test/src/cache_query_test.cpp | 6 +-
.../src/main/cpp/core-test/src/cache_test.cpp | 12 +-
.../main/cpp/core-test/src/ignition_test.cpp | 10 +-
modules/platform/src/main/cpp/core/Makefile.am | 2 +-
.../src/main/cpp/core/include/Makefile.am | 2 +-
.../src/main/cpp/core/include/ignite/grid.h | 154 -------------------
.../src/main/cpp/core/include/ignite/ignite.h | 154 +++++++++++++++++++
.../core/include/ignite/ignite_configuration.h | 2 +-
.../main/cpp/core/include/ignite/ignite_error.h | 2 +-
.../src/main/cpp/core/include/ignite/ignition.h | 82 +++++-----
.../include/ignite/impl/ignite_environment.h | 8 +-
.../cpp/core/include/ignite/impl/ignite_impl.h | 6 +-
.../src/main/cpp/core/project/vs/core.vcxproj | 4 +-
.../cpp/core/project/vs/core.vcxproj.filters | 4 +-
.../main/cpp/core/project/vs/core.vcxprojrel | 4 +-
modules/platform/src/main/cpp/core/src/grid.cpp | 43 ------
.../platform/src/main/cpp/core/src/ignite.cpp | 43 ++++++
.../platform/src/main/cpp/core/src/ignition.cpp | 40 ++---
.../cpp/core/src/impl/ignite_environment.cpp | 20 +--
.../src/main/cpp/core/src/impl/ignite_impl.cpp | 2 +-
24 files changed, 343 insertions(+), 342 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/common/include/ignite/common/exports.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/common/include/ignite/common/exports.h b/modules/platform/src/main/cpp/common/include/ignite/common/exports.h
index 48e86f0..930fad3 100644
--- a/modules/platform/src/main/cpp/common/include/ignite/common/exports.h
+++ b/modules/platform/src/main/cpp/common/include/ignite/common/exports.h
@@ -25,10 +25,10 @@ namespace gcj = ignite::common::java;
extern "C" {
int IGNITE_CALL IgniteReallocate(long long memPtr, int cap);
- void* IGNITE_CALL IgniteIgnitionStart(gcj::JniContext* ctx, char* cfgPath, char* gridName, int factoryId, long long dataPtr);
- void* IGNITE_CALL IgniteIgnitionInstance(gcj::JniContext* ctx, char* gridName);
- long long IGNITE_CALL IgniteIgnitionEnvironmentPointer(gcj::JniContext* ctx, char* gridName);
- bool IGNITE_CALL IgniteIgnitionStop(gcj::JniContext* ctx, char* gridName, bool cancel);
+ void* IGNITE_CALL IgniteIgnitionStart(gcj::JniContext* ctx, char* cfgPath, char* name, int factoryId, long long dataPtr);
+ void* IGNITE_CALL IgniteIgnitionInstance(gcj::JniContext* ctx, char* name);
+ long long IGNITE_CALL IgniteIgnitionEnvironmentPointer(gcj::JniContext* ctx, char* name);
+ bool IGNITE_CALL IgniteIgnitionStop(gcj::JniContext* ctx, char* name, bool cancel);
void IGNITE_CALL IgniteIgnitionStopAll(gcj::JniContext* ctx, bool cancel);
void IGNITE_CALL IgniteProcessorReleaseStart(gcj::JniContext* ctx, void* obj);
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/common/include/ignite/common/java.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/common/include/ignite/common/java.h b/modules/platform/src/main/cpp/common/include/ignite/common/java.h
index 426ac68..e2d23b2 100644
--- a/modules/platform/src/main/cpp/common/include/ignite/common/java.h
+++ b/modules/platform/src/main/cpp/common/include/ignite/common/java.h
@@ -449,14 +449,14 @@ namespace ignite
static void Detach();
static void Release(jobject obj);
- jobject IgnitionStart(char* cfgPath, char* gridName, int factoryId, long long dataPtr);
- jobject IgnitionStart(char* cfgPath, char* gridName, int factoryId, long long dataPtr, JniErrorInfo* errInfo);
- jobject IgnitionInstance(char* gridName);
- jobject IgnitionInstance(char* gridName, JniErrorInfo* errInfo);
- long long IgnitionEnvironmentPointer(char* gridName);
- long long IgnitionEnvironmentPointer(char* gridName, JniErrorInfo* errInfo);
- bool IgnitionStop(char* gridName, bool cancel);
- bool IgnitionStop(char* gridName, bool cancel, JniErrorInfo* errInfo);
+ jobject IgnitionStart(char* cfgPath, char* name, int factoryId, long long dataPtr);
+ jobject IgnitionStart(char* cfgPath, char* name, int factoryId, long long dataPtr, JniErrorInfo* errInfo);
+ jobject IgnitionInstance(char* name);
+ jobject IgnitionInstance(char* name, JniErrorInfo* errInfo);
+ long long IgnitionEnvironmentPointer(char* name);
+ long long IgnitionEnvironmentPointer(char* name, JniErrorInfo* errInfo);
+ bool IgnitionStop(char* name, bool cancel);
+ bool IgnitionStop(char* name, bool cancel, JniErrorInfo* errInfo);
void IgnitionStopAll(bool cancel);
void IgnitionStopAll(bool cancel, JniErrorInfo* errInfo);
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/common/src/exports.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/common/src/exports.cpp b/modules/platform/src/main/cpp/common/src/exports.cpp
index 10e4801..2ac3340 100644
--- a/modules/platform/src/main/cpp/common/src/exports.cpp
+++ b/modules/platform/src/main/cpp/common/src/exports.cpp
@@ -26,20 +26,20 @@ extern "C" {
return gcj::JniContext::Reallocate(memPtr, cap);
}
- void* IGNITE_CALL IgniteIgnitionStart(gcj::JniContext* ctx, char* cfgPath, char* gridName, int factoryId, long long dataPtr) {
- return ctx->IgnitionStart(cfgPath, gridName, factoryId, dataPtr);
+ void* IGNITE_CALL IgniteIgnitionStart(gcj::JniContext* ctx, char* cfgPath, char* name, int factoryId, long long dataPtr) {
+ return ctx->IgnitionStart(cfgPath, name, factoryId, dataPtr);
}
- void* IGNITE_CALL IgniteIgnitionInstance(gcj::JniContext* ctx, char* gridName) {
- return ctx->IgnitionInstance(gridName);
+ void* IGNITE_CALL IgniteIgnitionInstance(gcj::JniContext* ctx, char* name) {
+ return ctx->IgnitionInstance(name);
}
- long long IGNITE_CALL IgniteIgnitionEnvironmentPointer(gcj::JniContext* ctx, char* gridName) {
- return ctx->IgnitionEnvironmentPointer(gridName);
+ long long IGNITE_CALL IgniteIgnitionEnvironmentPointer(gcj::JniContext* ctx, char* name) {
+ return ctx->IgnitionEnvironmentPointer(name);
}
- bool IGNITE_CALL IgniteIgnitionStop(gcj::JniContext* ctx, char* gridName, bool cancel) {
- return ctx->IgnitionStop(gridName, cancel);
+ bool IGNITE_CALL IgniteIgnitionStop(gcj::JniContext* ctx, char* name, bool cancel) {
+ return ctx->IgnitionStop(name, cancel);
}
void IGNITE_CALL IgniteIgnitionStopAll(gcj::JniContext* ctx, bool cancel) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/common/src/java.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/common/src/java.cpp b/modules/platform/src/main/cpp/common/src/java.cpp
index 0c6524b..5c5911a 100644
--- a/modules/platform/src/main/cpp/common/src/java.cpp
+++ b/modules/platform/src/main/cpp/common/src/java.cpp
@@ -919,22 +919,22 @@ namespace ignite
}
}
- jobject JniContext::IgnitionStart(char* cfgPath, char* gridName, int factoryId, long long dataPtr) {
- return IgnitionStart(cfgPath, gridName, factoryId, dataPtr, NULL);
+ jobject JniContext::IgnitionStart(char* cfgPath, char* name, int factoryId, long long dataPtr) {
+ return IgnitionStart(cfgPath, name, factoryId, dataPtr, NULL);
}
- jobject JniContext::IgnitionStart(char* cfgPath, char* gridName, int factoryId, long long dataPtr, JniErrorInfo* errInfo)
+ jobject JniContext::IgnitionStart(char* cfgPath, char* name, int factoryId, long long dataPtr, JniErrorInfo* errInfo)
{
JNIEnv* env = Attach();
jstring cfgPath0 = env->NewStringUTF(cfgPath);
- jstring gridName0 = env->NewStringUTF(gridName);
+ jstring name0 = env->NewStringUTF(name);
jobject interop = env->CallStaticObjectMethod(
jvm->GetMembers().c_PlatformIgnition,
jvm->GetMembers().m_PlatformIgnition_start,
cfgPath0,
- gridName0,
+ name0,
factoryId,
reinterpret_cast<long long>(&hnds),
dataPtr
@@ -946,57 +946,57 @@ namespace ignite
}
- jobject JniContext::IgnitionInstance(char* gridName)
+ jobject JniContext::IgnitionInstance(char* name)
{
- return IgnitionInstance(gridName, NULL);
+ return IgnitionInstance(name, NULL);
}
- jobject JniContext::IgnitionInstance(char* gridName, JniErrorInfo* errInfo)
+ jobject JniContext::IgnitionInstance(char* name, JniErrorInfo* errInfo)
{
JNIEnv* env = Attach();
- jstring gridName0 = env->NewStringUTF(gridName);
+ jstring name0 = env->NewStringUTF(name);
jobject interop = env->CallStaticObjectMethod(jvm->GetMembers().c_PlatformIgnition,
- jvm->GetMembers().m_PlatformIgnition_instance, gridName0);
+ jvm->GetMembers().m_PlatformIgnition_instance, name0);
ExceptionCheck(env, errInfo);
return LocalToGlobal(env, interop);
}
- long long JniContext::IgnitionEnvironmentPointer(char* gridName)
+ long long JniContext::IgnitionEnvironmentPointer(char* name)
{
- return IgnitionEnvironmentPointer(gridName, NULL);
+ return IgnitionEnvironmentPointer(name, NULL);
}
- long long JniContext::IgnitionEnvironmentPointer(char* gridName, JniErrorInfo* errInfo)
+ long long JniContext::IgnitionEnvironmentPointer(char* name, JniErrorInfo* errInfo)
{
JNIEnv* env = Attach();
- jstring gridName0 = env->NewStringUTF(gridName);
+ jstring name0 = env->NewStringUTF(name);
long long res = env->CallStaticLongMethod(jvm->GetMembers().c_PlatformIgnition,
- jvm->GetMembers().m_PlatformIgnition_environmentPointer, gridName0);
+ jvm->GetMembers().m_PlatformIgnition_environmentPointer, name0);
ExceptionCheck(env, errInfo);
return res;
}
- bool JniContext::IgnitionStop(char* gridName, bool cancel)
+ bool JniContext::IgnitionStop(char* name, bool cancel)
{
- return IgnitionStop(gridName, cancel, NULL);
+ return IgnitionStop(name, cancel, NULL);
}
- bool JniContext::IgnitionStop(char* gridName, bool cancel, JniErrorInfo* errInfo)
+ bool JniContext::IgnitionStop(char* name, bool cancel, JniErrorInfo* errInfo)
{
JNIEnv* env = Attach();
- jstring gridName0 = env->NewStringUTF(gridName);
+ jstring name0 = env->NewStringUTF(name);
- jboolean res = env->CallStaticBooleanMethod(jvm->GetMembers().c_PlatformIgnition, jvm->GetMembers().m_PlatformIgnition_stop,
- gridName0, cancel);
+ jboolean res = env->CallStaticBooleanMethod(jvm->GetMembers().c_PlatformIgnition,
+ jvm->GetMembers().m_PlatformIgnition_stop, name0, cancel);
ExceptionCheck(env, errInfo);
@@ -1012,7 +1012,8 @@ namespace ignite
{
JNIEnv* env = Attach();
- env->CallStaticVoidMethod(jvm->GetMembers().c_PlatformIgnition, jvm->GetMembers().m_PlatformIgnition_stopAll, cancel);
+ env->CallStaticVoidMethod(jvm->GetMembers().c_PlatformIgnition,
+ jvm->GetMembers().m_PlatformIgnition_stopAll, cancel);
ExceptionCheck(env, errInfo);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core-test/src/cache_query_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core-test/src/cache_query_test.cpp b/modules/platform/src/main/cpp/core-test/src/cache_query_test.cpp
index 5bc1d61..6ccfd51 100644
--- a/modules/platform/src/main/cpp/core-test/src/cache_query_test.cpp
+++ b/modules/platform/src/main/cpp/core-test/src/cache_query_test.cpp
@@ -28,7 +28,7 @@
#include "ignite/cache/query/query_cursor.h"
#include "ignite/cache/query/query_sql.h"
#include "ignite/cache/query/query_text.h"
-#include "ignite/grid.h"
+#include "ignite/ignite.h"
#include "ignite/ignition.h"
using namespace boost::unit_test;
@@ -169,7 +169,7 @@ namespace ignite
}
/** Node started during the test. */
-Grid grid = Grid();
+Ignite grid = Ignite();
/** Cache accessor. */
Cache<int, QueryPerson> GetCache()
@@ -210,7 +210,7 @@ struct CacheQueryTestSuiteFixture {
IgniteError err;
- Grid grid0 = Ignition::Start(cfg, &err);
+ Ignite grid0 = Ignition::Start(cfg, &err);
if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
BOOST_ERROR(err.GetText());
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core-test/src/cache_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core-test/src/cache_test.cpp b/modules/platform/src/main/cpp/core-test/src/cache_test.cpp
index 43681ae..3e51507 100644
--- a/modules/platform/src/main/cpp/core-test/src/cache_test.cpp
+++ b/modules/platform/src/main/cpp/core-test/src/cache_test.cpp
@@ -22,15 +22,15 @@
#include <boost/test/unit_test.hpp>
#include "ignite/cache/cache_peek_mode.h"
-#include "ignite/grid.h"
+#include "ignite/Ignite.h"
#include "ignite/ignition.h"
using namespace ignite;
using namespace boost::unit_test;
/* Nodes started during the test. */
-Grid grid0 = Grid();
-Grid grid1 = Grid();
+Ignite grid0 = Ignite();
+Ignite grid1 = Ignite();
/** Cache accessor. */
cache::Cache<int, int> Cache()
@@ -123,7 +123,7 @@ struct CacheTestSuiteFixture {
IgniteError err;
- Grid grid = Ignition::Start(cfg, stream.str().c_str(), &err);
+ Ignite grid = Ignition::Start(cfg, stream.str().c_str(), &err);
if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
BOOST_FAIL(err.GetText());
@@ -143,8 +143,8 @@ struct CacheTestSuiteFixture {
Ignition::Stop(grid0.GetName(), true);
Ignition::Stop(grid1.GetName(), true);
- grid0 = Grid();
- grid1 = Grid();
+ grid0 = Ignite();
+ grid1 = Ignite();
}
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core-test/src/ignition_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core-test/src/ignition_test.cpp b/modules/platform/src/main/cpp/core-test/src/ignition_test.cpp
index ee7c581..5b764d4 100644
--- a/modules/platform/src/main/cpp/core-test/src/ignition_test.cpp
+++ b/modules/platform/src/main/cpp/core-test/src/ignition_test.cpp
@@ -21,7 +21,7 @@
#include <boost/test/unit_test.hpp>
-#include "ignite/grid.h"
+#include "ignite/Ignite.h"
#include "ignite/ignition.h"
using namespace ignite;
@@ -55,15 +55,15 @@ BOOST_AUTO_TEST_CASE(TestIgnition)
IgniteError err;
- // Start two grids
- Grid grid1 = Ignition::Start(cfg, "ignitionTest-1", &err);
+ // Start two Ignite instances.
+ Ignite grid1 = Ignition::Start(cfg, "ignitionTest-1", &err);
if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
BOOST_ERROR(err.GetText());
BOOST_REQUIRE(strcmp(grid1.GetName(), "ignitionTest-1") == 0);
- Grid grid2 = Ignition::Start(cfg, "ignitionTest-2", &err);
+ Ignite grid2 = Ignition::Start(cfg, "ignitionTest-2", &err);
if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
BOOST_ERROR(err.GetText());
@@ -71,7 +71,7 @@ BOOST_AUTO_TEST_CASE(TestIgnition)
BOOST_REQUIRE(strcmp(grid2.GetName(), "ignitionTest-2") == 0);
// Test get
- Grid grid0 = Ignition::Get("ignitionTest-1", &err);
+ Ignite grid0 = Ignition::Get("ignitionTest-1", &err);
if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
BOOST_ERROR(err.GetText());
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/Makefile.am b/modules/platform/src/main/cpp/core/Makefile.am
index dcbfdee..db50326 100644
--- a/modules/platform/src/main/cpp/core/Makefile.am
+++ b/modules/platform/src/main/cpp/core/Makefile.am
@@ -49,7 +49,7 @@ COMMON_SRC = os/linux/src/impl/utils.cpp \
src/impl/cache/query/query_impl.cpp \
src/impl/cache/cache_impl.cpp \
src/impl/ignite_impl.cpp \
- src/grid.cpp \
+ src/ignite.cpp \
src/ignition.cpp
lib_LTLIBRARIES = libignite.la
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/include/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/Makefile.am b/modules/platform/src/main/cpp/core/include/Makefile.am
index 10a223e..d623c78 100644
--- a/modules/platform/src/main/cpp/core/include/Makefile.am
+++ b/modules/platform/src/main/cpp/core/include/Makefile.am
@@ -54,7 +54,7 @@ nobase_include_HEADERS = ignite/cache/cache.h \
ignite/portable/portable_raw_writer.h \
ignite/portable/portable_reader.h \
ignite/portable/portable_writer.h \
- ignite/grid.h \
+ ignite/Ignite.h \
ignite/ignite_configuration.h \
ignite/ignite_error.h \
ignite/ignition.h \
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/include/ignite/grid.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/grid.h b/modules/platform/src/main/cpp/core/include/ignite/grid.h
deleted file mode 100644
index a8d0f42..0000000
--- a/modules/platform/src/main/cpp/core/include/ignite/grid.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _IGNITE_GRID
-#define _IGNITE_GRID
-
-#include "ignite/cache/cache.h"
-#include "ignite/impl/ignite_impl.h"
-#include "ignite/ignite_configuration.h"
-
-namespace ignite
-{
- /**
- * Main interface to operate with Ignite.
- */
- class IGNITE_IMPORT_EXPORT Grid
- {
- public:
- /**
- * Default constructor.
- */
- Grid();
-
- /**
- * Constructor.
- */
- Grid(impl::IgniteImpl* impl);
-
- /**
- * Get name of the grid.
- *
- * @return Name.
- */
- char* GetName();
-
- /**
- * Get cache.
- *
- * @param name Cache name.
- * @return Cache.
- */
- template<typename K, typename V>
- cache::Cache<K, V> GetCache(const char* name)
- {
- IgniteError err;
-
- cache::Cache<K, V> res = GetCache<K, V>(name, &err);
-
- IgniteError::ThrowIfNeeded(err);
-
- return res;
- }
-
- /**
- * Get cache.
- *
- * @param name Cache name.
- * @param err Error;
- * @return Cache.
- */
- template<typename K, typename V>
- cache::Cache<K, V> GetCache(const char* name, IgniteError* err)
- {
- impl::cache::CacheImpl* cacheImpl = impl.Get()->GetCache<K, V>(name, err);
-
- return cache::Cache<K, V>(cacheImpl);
- }
-
- /**
- * Get or create cache.
- *
- * @param name Cache name.
- * @return Cache.
- */
- template<typename K, typename V>
- cache::Cache<K, V> GetOrCreateCache(const char* name)
- {
- IgniteError err;
-
- cache::Cache<K, V> res = GetOrCreateCache<K, V>(name, &err);
-
- IgniteError::ThrowIfNeeded(err);
-
- return res;
- }
-
- /**
- * Get or create cache.
- *
- * @param name Cache name.
- * @param err Error;
- * @return Cache.
- */
- template<typename K, typename V>
- cache::Cache<K, V> GetOrCreateCache(const char* name, IgniteError* err)
- {
- impl::cache::CacheImpl* cacheImpl = impl.Get()->GetOrCreateCache<K, V>(name, err);
-
- return cache::Cache<K, V>(cacheImpl);
- }
-
- /**
- * Create cache.
- *
- * @param name Cache name.
- * @return Cache.
- */
- template<typename K, typename V>
- cache::Cache<K, V> CreateCache(const char* name)
- {
- IgniteError err;
-
- cache::Cache<K, V> res = CreateCache<K, V>(name, &err);
-
- IgniteError::ThrowIfNeeded(err);
-
- return res;
- }
-
- /**
- * Create cache.
- *
- * @param name Cache name.
- * @param err Error;
- * @return Cache.
- */
- template<typename K, typename V>
- cache::Cache<K, V> CreateCache(const char* name, IgniteError* err)
- {
- impl::cache::CacheImpl* cacheImpl = impl.Get()->CreateCache<K, V>(name, err);
-
- return cache::Cache<K, V>(cacheImpl);
- }
- private:
- /** Implementation delegate. */
- ignite::common::concurrent::SharedPointer<impl::IgniteImpl> impl;
- };
-}
-
-#endif
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/include/ignite/ignite.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/ignite.h b/modules/platform/src/main/cpp/core/include/ignite/ignite.h
new file mode 100644
index 0000000..6c1263e
--- /dev/null
+++ b/modules/platform/src/main/cpp/core/include/ignite/ignite.h
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _IGNITE
+#define _IGNITE
+
+#include "ignite/cache/cache.h"
+#include "ignite/impl/ignite_impl.h"
+#include "ignite/ignite_configuration.h"
+
+namespace ignite
+{
+ /**
+ * Main interface to operate with Ignite.
+ */
+ class IGNITE_IMPORT_EXPORT Ignite
+ {
+ public:
+ /**
+ * Default constructor.
+ */
+ Ignite();
+
+ /**
+ * Constructor.
+ */
+ Ignite(impl::IgniteImpl* impl);
+
+ /**
+ * Get Ignite instance name.
+ *
+ * @return Name.
+ */
+ char* GetName();
+
+ /**
+ * Get cache.
+ *
+ * @param name Cache name.
+ * @return Cache.
+ */
+ template<typename K, typename V>
+ cache::Cache<K, V> GetCache(const char* name)
+ {
+ IgniteError err;
+
+ cache::Cache<K, V> res = GetCache<K, V>(name, &err);
+
+ IgniteError::ThrowIfNeeded(err);
+
+ return res;
+ }
+
+ /**
+ * Get cache.
+ *
+ * @param name Cache name.
+ * @param err Error;
+ * @return Cache.
+ */
+ template<typename K, typename V>
+ cache::Cache<K, V> GetCache(const char* name, IgniteError* err)
+ {
+ impl::cache::CacheImpl* cacheImpl = impl.Get()->GetCache<K, V>(name, err);
+
+ return cache::Cache<K, V>(cacheImpl);
+ }
+
+ /**
+ * Get or create cache.
+ *
+ * @param name Cache name.
+ * @return Cache.
+ */
+ template<typename K, typename V>
+ cache::Cache<K, V> GetOrCreateCache(const char* name)
+ {
+ IgniteError err;
+
+ cache::Cache<K, V> res = GetOrCreateCache<K, V>(name, &err);
+
+ IgniteError::ThrowIfNeeded(err);
+
+ return res;
+ }
+
+ /**
+ * Get or create cache.
+ *
+ * @param name Cache name.
+ * @param err Error;
+ * @return Cache.
+ */
+ template<typename K, typename V>
+ cache::Cache<K, V> GetOrCreateCache(const char* name, IgniteError* err)
+ {
+ impl::cache::CacheImpl* cacheImpl = impl.Get()->GetOrCreateCache<K, V>(name, err);
+
+ return cache::Cache<K, V>(cacheImpl);
+ }
+
+ /**
+ * Create cache.
+ *
+ * @param name Cache name.
+ * @return Cache.
+ */
+ template<typename K, typename V>
+ cache::Cache<K, V> CreateCache(const char* name)
+ {
+ IgniteError err;
+
+ cache::Cache<K, V> res = CreateCache<K, V>(name, &err);
+
+ IgniteError::ThrowIfNeeded(err);
+
+ return res;
+ }
+
+ /**
+ * Create cache.
+ *
+ * @param name Cache name.
+ * @param err Error;
+ * @return Cache.
+ */
+ template<typename K, typename V>
+ cache::Cache<K, V> CreateCache(const char* name, IgniteError* err)
+ {
+ impl::cache::CacheImpl* cacheImpl = impl.Get()->CreateCache<K, V>(name, err);
+
+ return cache::Cache<K, V>(cacheImpl);
+ }
+ private:
+ /** Implementation delegate. */
+ ignite::common::concurrent::SharedPointer<impl::IgniteImpl> impl;
+ };
+}
+
+#endif
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/include/ignite/ignite_configuration.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/ignite_configuration.h b/modules/platform/src/main/cpp/core/include/ignite/ignite_configuration.h
index f13f59a..ce2d730 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/ignite_configuration.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/ignite_configuration.h
@@ -50,7 +50,7 @@ namespace ignite
};
/**
- * Grid configuration.
+ * Ignite configuration.
*/
struct IgniteConfiguration
{
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/include/ignite/ignite_error.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/ignite_error.h b/modules/platform/src/main/cpp/core/include/ignite/ignite_error.h
index eb95adc..4438a0e 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/ignite_error.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/ignite_error.h
@@ -68,7 +68,7 @@
namespace ignite
{
/**
- * Grid error information.
+ * Ignite error information.
*/
class IGNITE_IMPORT_EXPORT IgniteError
{
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/include/ignite/ignition.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/ignition.h b/modules/platform/src/main/cpp/core/include/ignite/ignition.h
index 641277c..8d32448 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/ignition.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/ignition.h
@@ -59,7 +59,7 @@
#ifndef _IGNITE_IGNITION
#define _IGNITE_IGNITION
-#include "ignite/grid.h"
+#include "ignite/ignite.h"
#include "ignite/ignite_configuration.h"
#include "ignite/ignite_error.h"
@@ -72,118 +72,118 @@ namespace ignite
{
public:
/**
- * Start grid instance.
+ * Start Ignite instance.
*
* @param cfg Configuration.
- * @return Grid instance or null in case of error.
+ * @return Ignite instance or null in case of error.
*/
- static Grid Start(const IgniteConfiguration& cfg);
+ static Ignite Start(const IgniteConfiguration& cfg);
/*
- * Start grid instance.
+ * Start Ignite instance.
*
* @param cfg Configuration.
* @param err Error.
- * @return Grid instance or null in case of error.
+ * @return Ignite instance or null in case of error.
*/
- static Grid Start(const IgniteConfiguration& cfg, IgniteError* err);
+ static Ignite Start(const IgniteConfiguration& cfg, IgniteError* err);
/**
- * Start grid instance with specific name.
+ * Start Ignite instance with specific name.
*
* @param cfg Configuration.
- * @param name Grid name.
- * @return Grid instance or null in case of error.
+ * @param name Ignite name.
+ * @return Ignite instance or null in case of error.
*/
- static Grid Start(const IgniteConfiguration& cfg, const char* name);
+ static Ignite Start(const IgniteConfiguration& cfg, const char* name);
/**
- * Start grid instance with specific name.
+ * Start Ignite instance with specific name.
*
* @param cfg Configuration.
- * @param name Grid name.
+ * @param name Ignite name.
* @param err Error.
- * @return Grid instance or null in case of error.
+ * @return Ignite instance or null in case of error.
*/
- static Grid Start(const IgniteConfiguration& cfg, const char* name, IgniteError* err);
+ static Ignite Start(const IgniteConfiguration& cfg, const char* name, IgniteError* err);
/**
- * Get default grid instance.
+ * Get default Ignite instance.
*
- * @return Grid instance.
+ * @return Default Ignite instance.
*/
- static Grid Get();
+ static Ignite Get();
/**
- * Get default grid instance.
+ * Get default Ignite instance.
*
* @param err Error.
- * @return Grid instance.
+ * @return Default Ignite instance.
*/
- static Grid Get(IgniteError* err);
+ static Ignite Get(IgniteError* err);
/**
- * Get grid instance with the given name.
+ * Get Ignite instance with the given name.
*
- * @param name Grid name.
- * @return Grid instance.
+ * @param name Ignite name.
+ * @return Ignite instance.
*/
- static Grid Get(const char* name);
+ static Ignite Get(const char* name);
/**
- * Get grid instance with the given name.
+ * Get Ignite instance with the given name.
*
- * @param name Grid name.
+ * @param name Ignite name.
* @param err Error.
- * @return Grid instance.
+ * @return Ignite instance.
*/
- static Grid Get(const char* name, IgniteError* err);
+ static Ignite Get(const char* name, IgniteError* err);
/**
- * Stop default grid instance.
+ * Stop default Ignite instance.
*
* @param cancel Cancel flag.
- * @return True if grid instance was stopped by this call.
+ * @return True if default Ignite instance was stopped by this call.
*/
static bool Stop(const bool cancel);
/**
- * Stop default grid instance.
+ * Stop default Ignite instance.
*
* @param cancel Cancel flag.
* @param err Error.
- * @return True if grid instance was stopped by this call.
+ * @return True if Ignite instance was stopped by this call.
*/
static bool Stop(const bool cancel, IgniteError* err);
/**
- * Stop grid instance with the given name.
+ * Stop Ignite instance with the given name.
*
- * @param name Grid name.
+ * @param name Ignite name.
* @param cancel Cancel flag.
- * @return True if grid instance was stopped by this call.
+ * @return True if Ignite instance was stopped by this call.
*/
static bool Stop(const char* name, const bool cancel);
/**
- * Stop grid instance with the given name.
+ * Stop Ignite instance with the given name.
*
- * @param name Grid name.
+ * @param name Ignite name.
* @param cancel Cancel flag.
* @param err Error.
- * @return True if grid instance was stopped by this call.
+ * @return True if Ignite instance was stopped by this call.
*/
static bool Stop(const char* name, const bool cancel, IgniteError* err);
/**
- * Stop all running grid instances.
+ * Stop all running Ignite instances.
*
* @param cancel Cancel flag.
*/
static void StopAll(const bool cancel);
/**
- * Stop all running grid instances.
+ * Stop all running Ignite instances.
*
* @param cancel Cancel flag.
* @param err Error.
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/include/ignite/impl/ignite_environment.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/impl/ignite_environment.h b/modules/platform/src/main/cpp/core/include/ignite/impl/ignite_environment.h
index 40dc4ae..2f195b2 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/impl/ignite_environment.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/impl/ignite_environment.h
@@ -67,11 +67,11 @@ namespace ignite
void OnStartCallback(long long memPtr);
/**
- * Get name of the grid.
+ * Get name of Ignite instance.
*
* @return Name.
*/
- char* GridName();
+ char* InstanceName();
/**
* Get JNI context.
@@ -116,8 +116,8 @@ namespace ignite
/** Startup latch. */
ignite::common::concurrent::SingleLatch* latch;
- /** Grid name. */
- char* gridName;
+ /** Ignite name. */
+ char* name;
/** Metadata manager. */
portable::PortableMetadataManager* metaMgr;
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/include/ignite/impl/ignite_impl.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/impl/ignite_impl.h b/modules/platform/src/main/cpp/core/include/ignite/impl/ignite_impl.h
index fab7a2d..52472c6 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/impl/ignite_impl.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/impl/ignite_impl.h
@@ -30,11 +30,11 @@ namespace ignite
namespace impl
{
/**
- * Grid implementation.
+ * Ignite implementation.
*/
class IgniteImpl
{
- friend class Grid;
+ friend class Ignite;
public:
/**
* Constructor used to create new instance.
@@ -50,7 +50,7 @@ namespace ignite
~IgniteImpl();
/**
- * Get name of the grid.
+ * Get name of the Ignite.
*
* @param Name.
*/
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/project/vs/core.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/project/vs/core.vcxproj b/modules/platform/src/main/cpp/core/project/vs/core.vcxproj
index 32ea6e4..58fa283 100644
--- a/modules/platform/src/main/cpp/core/project/vs/core.vcxproj
+++ b/modules/platform/src/main/cpp/core/project/vs/core.vcxproj
@@ -197,7 +197,7 @@
<ClInclude Include="..\..\include\ignite\cache\query\query_scan.h" />
<ClInclude Include="..\..\include\ignite\cache\query\query_sql.h" />
<ClInclude Include="..\..\include\ignite\cache\query\query_text.h" />
- <ClInclude Include="..\..\include\ignite\grid.h" />
+ <ClInclude Include="..\..\include\ignite\ignite.h" />
<ClInclude Include="..\..\include\ignite\ignite_configuration.h" />
<ClInclude Include="..\..\include\ignite\ignite_error.h" />
<ClInclude Include="..\..\include\ignite\ignition.h" />
@@ -234,7 +234,7 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\os\win\src\impl\utils.cpp" />
- <ClCompile Include="..\..\src\grid.cpp" />
+ <ClCompile Include="..\..\src\ignite.cpp" />
<ClCompile Include="..\..\src\ignite_error.cpp" />
<ClCompile Include="..\..\src\ignition.cpp" />
<ClCompile Include="..\..\src\guid.cpp" />
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/project/vs/core.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/project/vs/core.vcxproj.filters b/modules/platform/src/main/cpp/core/project/vs/core.vcxproj.filters
index d01a7f5..d18599d 100644
--- a/modules/platform/src/main/cpp/core/project/vs/core.vcxproj.filters
+++ b/modules/platform/src/main/cpp/core/project/vs/core.vcxproj.filters
@@ -46,7 +46,7 @@
<ClCompile Include="..\..\os\win\src\impl\utils.cpp">
<Filter>Code\impl</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\grid.cpp">
+ <ClCompile Include="..\..\src\ignite.cpp">
<Filter>Code</Filter>
</ClCompile>
<ClCompile Include="..\..\src\ignite_error.cpp">
@@ -153,7 +153,7 @@
<ClInclude Include="..\..\os\win\include\ignite\impl\utils.h">
<Filter>Code\impl</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\ignite\grid.h">
+ <ClInclude Include="..\..\include\ignite\ignite.h">
<Filter>Code</Filter>
</ClInclude>
<ClInclude Include="..\..\include\ignite\ignite_configuration.h">
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/project/vs/core.vcxprojrel
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/project/vs/core.vcxprojrel b/modules/platform/src/main/cpp/core/project/vs/core.vcxprojrel
index 32ea6e4..58fa283 100644
--- a/modules/platform/src/main/cpp/core/project/vs/core.vcxprojrel
+++ b/modules/platform/src/main/cpp/core/project/vs/core.vcxprojrel
@@ -197,7 +197,7 @@
<ClInclude Include="..\..\include\ignite\cache\query\query_scan.h" />
<ClInclude Include="..\..\include\ignite\cache\query\query_sql.h" />
<ClInclude Include="..\..\include\ignite\cache\query\query_text.h" />
- <ClInclude Include="..\..\include\ignite\grid.h" />
+ <ClInclude Include="..\..\include\ignite\ignite.h" />
<ClInclude Include="..\..\include\ignite\ignite_configuration.h" />
<ClInclude Include="..\..\include\ignite\ignite_error.h" />
<ClInclude Include="..\..\include\ignite\ignition.h" />
@@ -234,7 +234,7 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\os\win\src\impl\utils.cpp" />
- <ClCompile Include="..\..\src\grid.cpp" />
+ <ClCompile Include="..\..\src\ignite.cpp" />
<ClCompile Include="..\..\src\ignite_error.cpp" />
<ClCompile Include="..\..\src\ignition.cpp" />
<ClCompile Include="..\..\src\guid.cpp" />
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/src/grid.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/grid.cpp b/modules/platform/src/main/cpp/core/src/grid.cpp
deleted file mode 100644
index f4e68c5..0000000
--- a/modules/platform/src/main/cpp/core/src/grid.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <ignite/common/java.h>
-
-#include "ignite/impl/ignite_impl.h"
-#include "ignite/grid.h"
-
-using namespace ignite::common::concurrent;
-using namespace ignite::impl;
-
-namespace ignite
-{
- Grid::Grid() : impl(SharedPointer<IgniteImpl>())
- {
- // No-op.
- }
-
- Grid::Grid(IgniteImpl* impl) : impl(SharedPointer<IgniteImpl>(impl))
- {
- // No-op.
- }
-
- char* Grid::GetName()
- {
- return impl.Get()->GetName();
- }
-}
-
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/src/ignite.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/ignite.cpp b/modules/platform/src/main/cpp/core/src/ignite.cpp
new file mode 100644
index 0000000..665383b
--- /dev/null
+++ b/modules/platform/src/main/cpp/core/src/ignite.cpp
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <ignite/common/java.h>
+
+#include "ignite/impl/ignite_impl.h"
+#include "ignite/ignite.h"
+
+using namespace ignite::common::concurrent;
+using namespace ignite::impl;
+
+namespace ignite
+{
+ Ignite::Ignite() : impl(SharedPointer<IgniteImpl>())
+ {
+ // No-op.
+ }
+
+ Ignite::Ignite(IgniteImpl* impl) : impl(SharedPointer<IgniteImpl>(impl))
+ {
+ // No-op.
+ }
+
+ char* Ignite::GetName()
+ {
+ return impl.Get()->GetName();
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/src/ignition.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/ignition.cpp b/modules/platform/src/main/cpp/core/src/ignition.cpp
index ed0731b..6e72622 100644
--- a/modules/platform/src/main/cpp/core/src/ignition.cpp
+++ b/modules/platform/src/main/cpp/core/src/ignition.cpp
@@ -35,7 +35,7 @@ using namespace ignite::impl::utils;
namespace ignite
{
/** Default configuration. */
- const char* GRID_DFLT_CFG = "config/default-config.xml";
+ const char* DFLT_CFG = "config/default-config.xml";
/** Whether JVM library is loaded to the process. */
bool JVM_LIB_LOADED;
@@ -43,7 +43,7 @@ namespace ignite
/** Critical section for factory methods. */
CriticalSection factoryLock;
- /** Flag indicating that at least one grid has started. */
+ /** Flag indicating that at least one Ignite instance has started. */
bool started = false;
/**
@@ -109,28 +109,28 @@ namespace ignite
return opts;
}
- Grid Ignition::Start(const IgniteConfiguration& cfg)
+ Ignite Ignition::Start(const IgniteConfiguration& cfg)
{
return Start(cfg, static_cast<const char*>(NULL));
}
- Grid Ignition::Start(const IgniteConfiguration& cfg, IgniteError* err)
+ Ignite Ignition::Start(const IgniteConfiguration& cfg, IgniteError* err)
{
return Start(cfg, NULL, err);
}
- Grid Ignition::Start(const IgniteConfiguration& cfg, const char* name)
+ Ignite Ignition::Start(const IgniteConfiguration& cfg, const char* name)
{
IgniteError err;
- Grid res = Start(cfg, name, &err);
+ Ignite res = Start(cfg, name, &err);
IgniteError::ThrowIfNeeded(err);
return res;
}
- Grid Ignition::Start(const IgniteConfiguration& cfg, const char* name, IgniteError* err)
+ Ignite Ignition::Start(const IgniteConfiguration& cfg, const char* name, IgniteError* err)
{
bool failed = false;
@@ -236,7 +236,7 @@ namespace ignite
char* springCfgPath0 = CopyChars(cfg.springCfgPath);
if (!springCfgPath0)
- springCfgPath0 = CopyChars(GRID_DFLT_CFG);
+ springCfgPath0 = CopyChars(DFLT_CFG);
char* name0 = CopyChars(name);
@@ -278,40 +278,40 @@ namespace ignite
if (envTarget)
delete envTarget;
- return Grid();
+ return Ignite();
}
else
{
IgniteImpl* impl = new IgniteImpl(env, javaRef);
- return Grid(impl);
+ return Ignite(impl);
}
}
- Grid Ignition::Get()
+ Ignite Ignition::Get()
{
return Get(static_cast<const char*>(NULL));
}
- Grid Ignition::Get(IgniteError* err)
+ Ignite Ignition::Get(IgniteError* err)
{
return Get(NULL, err);
}
- Grid Ignition::Get(const char* name)
+ Ignite Ignition::Get(const char* name)
{
IgniteError err;
- Grid res = Get(name, &err);
+ Ignite res = Get(name, &err);
IgniteError::ThrowIfNeeded(err);
return res;
}
- Grid Ignition::Get(const char* name, IgniteError* err)
+ Ignite Ignition::Get(const char* name, IgniteError* err)
{
- Grid res;
+ Ignite res;
factoryLock.Enter();
@@ -351,19 +351,19 @@ namespace ignite
{
IgniteImpl* impl = new IgniteImpl(*env, ref);
- res = Grid(impl);
+ res = Ignite(impl);
}
else
// Error: concurrent node stop.
*err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
- "Failed to get grid instance because it was stopped concurrently.");
+ "Failed to get Ignite instance because it was stopped concurrently.");
}
}
else
// Error: no node with the given name.
*err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
- "Failed to get grid instance because it is either not started yet or already stopped.");
+ "Failed to get Ignite instance because it is either not started yet or already stopped.");
}
}
@@ -372,7 +372,7 @@ namespace ignite
else
// Error: no node with the given name.
*err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
- "Failed to get grid instance because it is either not started yet or already stopped.");
+ "Failed to get Ignite instance because it is either not started yet or already stopped.");
factoryLock.Leave();
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/src/impl/ignite_environment.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/impl/ignite_environment.cpp b/modules/platform/src/main/cpp/core/src/impl/ignite_environment.cpp
index 033d529..b20c543 100644
--- a/modules/platform/src/main/cpp/core/src/impl/ignite_environment.cpp
+++ b/modules/platform/src/main/cpp/core/src/impl/ignite_environment.cpp
@@ -54,7 +54,7 @@ namespace ignite
delete ptr;
}
- IgniteEnvironment::IgniteEnvironment() : ctx(SharedPointer<JniContext>()), latch(new SingleLatch), gridName(NULL),
+ IgniteEnvironment::IgniteEnvironment() : ctx(SharedPointer<JniContext>()), latch(new SingleLatch), name(NULL),
metaMgr(new PortableMetadataManager())
{
// No-op.
@@ -64,8 +64,8 @@ namespace ignite
{
delete latch;
- if (gridName)
- delete gridName;
+ if (name)
+ delete name;
delete metaMgr;
}
@@ -91,9 +91,9 @@ namespace ignite
latch->CountDown();
}
- char* IgniteEnvironment::GridName()
+ char* IgniteEnvironment::InstanceName()
{
- return gridName;
+ return name;
}
JniContext* IgniteEnvironment::Context()
@@ -147,15 +147,15 @@ namespace ignite
PortableReaderImpl reader(&stream);
- int32_t gridNameLen = reader.ReadString(NULL, 0);
+ int32_t nameLen = reader.ReadString(NULL, 0);
- if (gridNameLen >= 0)
+ if (nameLen >= 0)
{
- gridName = new char[gridNameLen + 1];
- reader.ReadString(gridName, gridNameLen + 1);
+ name = new char[nameLen + 1];
+ reader.ReadString(name, nameLen + 1);
}
else
- gridName = NULL;
+ name = NULL;
}
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/4aead326/modules/platform/src/main/cpp/core/src/impl/ignite_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/impl/ignite_impl.cpp b/modules/platform/src/main/cpp/core/src/impl/ignite_impl.cpp
index 51bf87b..1aad309 100644
--- a/modules/platform/src/main/cpp/core/src/impl/ignite_impl.cpp
+++ b/modules/platform/src/main/cpp/core/src/impl/ignite_impl.cpp
@@ -36,7 +36,7 @@ namespace ignite
char* IgniteImpl::GetName()
{
- return env.Get()->GridName();
+ return env.Get()->InstanceName();
}
}
}