You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dm...@apache.org on 2016/05/05 19:37:51 UTC
[17/40] ignite git commit: IGNITE-1786: Implemented ODBC driver.
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/examples/odbc-example/src/odbc_example.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/odbc-example/src/odbc_example.cpp b/modules/platforms/cpp/examples/odbc-example/src/odbc_example.cpp
new file mode 100644
index 0000000..39648d2
--- /dev/null
+++ b/modules/platforms/cpp/examples/odbc-example/src/odbc_example.cpp
@@ -0,0 +1,286 @@
+/*
+ * 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.
+ */
+
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
+#include <sql.h>
+#include <sqlext.h>
+
+#include <iostream>
+#include <iomanip>
+#include <vector>
+#include <string>
+#include <sstream>
+
+#include "ignite/ignite.h"
+#include "ignite/ignition.h"
+
+#include "ignite/examples/person.h"
+#include "ignite/examples/organization.h"
+
+using namespace ignite;
+using namespace cache;
+
+using namespace examples;
+
+/**
+ * This example populates cache with sample data and runs several SQL queries
+ * over this data using system ODBC API and Apache Ignite ODBC driver.
+ *
+ * To run this example you should first install ODBC driver as described in
+ * README file for the ODBC driver project.
+ *
+ * After all pre-requirements are fulfilled just build project as described
+ * in README and run resulting file.
+ */
+
+/** Read buffer size. */
+enum { ODBC_BUFFER_SIZE = 1024 };
+
+/**
+ * Represents simple string buffer.
+ */
+struct OdbcStringBuffer
+{
+ SQLCHAR buffer[ODBC_BUFFER_SIZE];
+ SQLLEN reallen;
+};
+
+/**
+ * Print result set returned by query.
+ *
+ * @param stmt Statement.
+ */
+void PrintOdbcResultSet(SQLHSTMT stmt)
+{
+ SQLSMALLINT columnsCnt = 0;
+
+ // Getting number of columns in result set.
+ SQLNumResultCols(stmt, &columnsCnt);
+
+ std::vector<OdbcStringBuffer> columns(columnsCnt);
+
+ // Binding colums.
+ for (SQLSMALLINT i = 0; i < columnsCnt; ++i)
+ SQLBindCol(stmt, i + 1, SQL_CHAR, columns[i].buffer, ODBC_BUFFER_SIZE, &columns[i].reallen);
+
+ while (true)
+ {
+ SQLRETURN ret = SQLFetch(stmt);
+
+ if (!SQL_SUCCEEDED(ret))
+ break;
+
+ std::cout << ">>> ";
+
+ for (size_t i = 0; i < columns.size(); ++i)
+ std::cout << std::setw(16) << std::left << columns[i].buffer << " ";
+
+ std::cout << std::endl;
+ }
+}
+
+/**
+ * Extract error message.
+ *
+ * @param handleType Type of the handle.
+ * @param handle Handle.
+ * @return Error message.
+ */
+std::string GetOdbcErrorMessage(SQLSMALLINT handleType, SQLHANDLE handle)
+{
+ SQLCHAR sqlstate[7] = {};
+ SQLINTEGER nativeCode;
+
+ SQLCHAR message[ODBC_BUFFER_SIZE];
+ SQLSMALLINT reallen = 0;
+
+ SQLGetDiagRec(handleType, handle, 1, sqlstate, &nativeCode, message, ODBC_BUFFER_SIZE, &reallen);
+
+ return std::string(reinterpret_cast<char*>(sqlstate)) + ": " +
+ std::string(reinterpret_cast<char*>(message), reallen);
+}
+
+/**
+ * Fetch cache data using ODBC interface.
+ */
+void GetDataWithOdbc(const std::string& query)
+{
+ SQLHENV env;
+
+ // Allocate an environment handle
+ SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &env);
+
+ // We want ODBC 3 support
+ SQLSetEnvAttr(env, SQL_ATTR_ODBC_VERSION, reinterpret_cast<void*>(SQL_OV_ODBC3), 0);
+
+ SQLHDBC dbc;
+
+ // Allocate a connection handle
+ SQLAllocHandle(SQL_HANDLE_DBC, env, &dbc);
+
+ // Combining connect string
+ std::string connectStr = "DRIVER={Apache Ignite};SERVER=localhost;PORT=10800;CACHE=Person;";
+
+ SQLCHAR outstr[ODBC_BUFFER_SIZE];
+ SQLSMALLINT outstrlen;
+
+ // Connecting to ODBC server.
+ SQLRETURN ret = SQLDriverConnect(dbc, NULL, reinterpret_cast<SQLCHAR*>(&connectStr[0]),
+ static_cast<SQLSMALLINT>(connectStr.size()), outstr, sizeof(outstr), &outstrlen, SQL_DRIVER_COMPLETE);
+
+ if (!SQL_SUCCEEDED(ret))
+ {
+ std::cerr << "Failed to connect: " << GetOdbcErrorMessage(SQL_HANDLE_DBC, dbc) << std::endl;
+
+ return;
+ }
+
+ SQLHSTMT stmt;
+
+ // Allocate a statement handle
+ SQLAllocHandle(SQL_HANDLE_STMT, dbc, &stmt);
+
+ std::vector<SQLCHAR> buf(query.begin(), query.end());
+
+ ret = SQLExecDirect(stmt, &buf[0], static_cast<SQLSMALLINT>(buf.size()));
+
+ if (SQL_SUCCEEDED(ret))
+ PrintOdbcResultSet(stmt);
+ else
+ std::cerr << "Failed to execute query: " << GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt) << std::endl;
+
+ // Releasing statement handle.
+ SQLFreeHandle(SQL_HANDLE_STMT, stmt);
+
+ // Disconneting from the server.
+ SQLDisconnect(dbc);
+
+ // Releasing allocated handles.
+ SQLFreeHandle(SQL_HANDLE_DBC, dbc);
+ SQLFreeHandle(SQL_HANDLE_ENV, env);
+}
+
+/**
+ * Populate Person cache with sample data.
+ *
+ * @param cache Cache instance.
+ */
+void Populate(Cache<int64_t, Person>& cache)
+{
+ std::map<int64_t, Person> persons;
+
+ int64_t key = 0;
+ persons[++key] = Person(1, "John", "Doe", "Master Degree.", 2200.0);
+ persons[++key] = Person(1, "Jane", "Doe", "Bachelor Degree.", 1300.0);
+ persons[++key] = Person(2, "John", "Smith", "Bachelor Degree.", 1700.0);
+ persons[++key] = Person(2, "Jane", "Smith", "Master Degree.", 2500.0);
+ persons[++key] = Person(2, "John", "Roe", "Bachelor Degree.", 1500.0);
+ persons[++key] = Person(2, "Jane", "Roe", "Bachelor Degree.", 1000.0);
+ persons[++key] = Person(1, "Richard", "Miles", "Master Degree.", 2400.0);
+ persons[++key] = Person(2, "Mary", "Major", "Bachelor Degree.", 900.0);
+
+ cache.PutAll(persons);
+}
+
+/**
+ * Populate Organization cache with sample data.
+ *
+ * @param cache Cache instance.
+ */
+void Populate(Cache<int64_t, Organization>& cache)
+{
+ std::map<int64_t, Organization> orgs;
+
+ int64_t key = 0;
+ orgs[++key] = Organization("Microsoft", Address("1096 Eddy Street, San Francisco, CA", 94109));
+ orgs[++key] = Organization("Red Cross", Address("184 Fidler Drive, San Antonio, TX", 78205));
+
+ cache.PutAll(orgs);
+}
+
+/**
+ * Program entry point.
+ *
+ * @return Exit code.
+ */
+int main()
+{
+ IgniteConfiguration cfg;
+
+ cfg.jvmInitMem = 512;
+ cfg.jvmMaxMem = 512;
+
+ cfg.springCfgPath = "platforms/cpp/examples/odbc-example/config/example-odbc.xml";
+
+ try
+ {
+ // Start a node.
+ Ignite grid = Ignition::Start(cfg);
+
+ std::cout << std::endl;
+ std::cout << ">>> Cache ODBC example started." << std::endl;
+ std::cout << std::endl;
+
+ // Get Person cache instance.
+ Cache<int64_t, Person> personCache = grid.GetCache<int64_t, Person>("Person");
+
+ // Get Organization cache instance.
+ Cache<int64_t, Organization> orgCache = grid.GetCache<int64_t, Organization>("Organization");
+
+ // Clear caches.
+ personCache.Clear();
+ orgCache.Clear();
+
+ // Populate caches.
+ Populate(personCache);
+ Populate(orgCache);
+
+ std::cout << std::endl;
+ std::cout << ">>> Getting list of persons:" << std::endl;
+
+ GetDataWithOdbc("SELECT firstName, lastName, resume, salary FROM Person");
+
+ std::cout << std::endl;
+ std::cout << ">>> Getting average salary by degree:" << std::endl;
+
+ GetDataWithOdbc("SELECT resume, AVG(salary) FROM Person GROUP BY resume");
+
+ std::cout << std::endl;
+ std::cout << ">>> Getting people with organizations:" << std::endl;
+
+ GetDataWithOdbc("SELECT firstName, lastName, Organization.name FROM Person "
+ "INNER JOIN \"Organization\".Organization ON Person.orgId = Organization._KEY");
+
+ // Stop node.
+ Ignition::StopAll(false);
+ }
+ catch (IgniteError& err)
+ {
+ std::cout << "An error occurred: " << err.GetText() << std::endl;
+ }
+
+ std::cout << std::endl;
+ std::cout << ">>> Example finished, press any key to exit ..." << std::endl;
+ std::cout << std::endl;
+
+ std::cin.get();
+
+ return 0;
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/examples/project/vs/ignite-examples.sln
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/project/vs/ignite-examples.sln b/modules/platforms/cpp/examples/project/vs/ignite-examples.sln
index 4970654..5fdaaef 100644
--- a/modules/platforms/cpp/examples/project/vs/ignite-examples.sln
+++ b/modules/platforms/cpp/examples/project/vs/ignite-examples.sln
@@ -1,6 +1,9 @@
-\ufeffMicrosoft Visual Studio Solution File, Format Version 11.00
+\ufeff
+Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ignite-examples", "ignite-examples.vcxproj", "{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "putget-example", "..\..\putget-example\project\vs\putget-example.vcxproj", "{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "odbc-example", "..\..\odbc-example\project\vs\odbc-example.vcxproj", "{56839DFF-6C03-416B-BC5F-DDC6EBF8512D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -12,6 +15,10 @@ Global
{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x64.Build.0 = Release|x64
{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x86.ActiveCfg = Release|Win32
{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x86.Build.0 = Release|Win32
+ {56839DFF-6C03-416B-BC5F-DDC6EBF8512D}.Release|x64.ActiveCfg = Release|x64
+ {56839DFF-6C03-416B-BC5F-DDC6EBF8512D}.Release|x64.Build.0 = Release|x64
+ {56839DFF-6C03-416B-BC5F-DDC6EBF8512D}.Release|x86.ActiveCfg = Release|Win32
+ {56839DFF-6C03-416B-BC5F-DDC6EBF8512D}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj b/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj
deleted file mode 100644
index b04bfb9..0000000
--- a/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj
+++ /dev/null
@@ -1,107 +0,0 @@
-\ufeff<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}</ProjectGuid>
- <Keyword>Win32Proj</Keyword>
- <RootNamespace>igniteexamples</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v100</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v100</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\include;..\..\..\common\os\win\include;..\..\..\common\include;..\..\..\core\os\win\include;..\..\..\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\..\..\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- </Link>
- <PostBuildEvent>
- <Command>copy "$(ProjectDir)..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
-copy "$(ProjectDir)..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\include;..\..\..\common\os\win\include;..\..\..\common\include;..\..\..\core\os\win\include;..\..\..\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\..\..\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- </Link>
- <PostBuildEvent>
- <Command>copy "$(ProjectDir)..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
-copy "$(ProjectDir)..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\src\putgetexample.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\include\ignite\examples\address.h" />
- <ClInclude Include="..\..\include\ignite\examples\organization.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj.filters b/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj.filters
deleted file mode 100644
index ca62db7..0000000
--- a/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj.filters
+++ /dev/null
@@ -1,30 +0,0 @@
-\ufeff<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\src\putgetexample.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\include\ignite\examples\address.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\include\ignite\examples\organization.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
-</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/examples/putget-example/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/putget-example/Makefile.am b/modules/platforms/cpp/examples/putget-example/Makefile.am
new file mode 100644
index 0000000..5301ea1
--- /dev/null
+++ b/modules/platforms/cpp/examples/putget-example/Makefile.am
@@ -0,0 +1,56 @@
+##
+## 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.
+##
+
+ACLOCAL_AMFLAGS =-I m4
+
+noinst_PROGRAMS = ignite-putgetexample
+
+AM_CPPFLAGS = \
+ -I@top_srcdir@/include \
+ -I@top_srcdir@/../core/include \
+ -I@top_srcdir@/../core/os/linux/include \
+ -I@top_srcdir@/../common/include \
+ -I@top_srcdir@/../common/os/linux/include \
+ -I@top_srcdir@/../binary/include \
+ -I@top_srcdir@/../jni/include \
+ -I@top_srcdir@/../jni/os/linux/include \
+ -I$(JAVA_HOME)/include \
+ -I$(JAVA_HOME)/include/linux \
+ -DIGNITE_IMPL
+
+AM_CXXFLAGS = \
+ -Wall \
+ -std=c++0x
+
+ignite_putgetexample_LDADD = \
+ @top_srcdir@/../core/libignite.la \
+ -lpthread
+
+ignite_putgetexample_LDFLAGS = \
+ -static-libtool-libs
+
+ignite_putgetexample_SOURCES = \
+ src/putget_example.cpp
+
+run-check: check
+ ./ignite-putgetexample -p
+
+clean-local: clean-check
+ $(RM) *.gcno *.gcda
+
+clean-check:
+ $(RM) $(ignite_putgetexample_OBJECTS)
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/examples/putget-example/config/example-cache.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/putget-example/config/example-cache.xml b/modules/platforms/cpp/examples/putget-example/config/example-cache.xml
new file mode 100644
index 0000000..28b726c
--- /dev/null
+++ b/modules/platforms/cpp/examples/putget-example/config/example-cache.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ 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.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd">
+ <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+ <!-- Set to true to enable distributed class loading for examples, default is false. -->
+ <property name="peerClassLoadingEnabled" value="true"/>
+
+ <property name="cacheConfiguration">
+ <list>
+ <!--
+ Partitioned cache example configuration with binary objects enabled.
+ -->
+ <bean class="org.apache.ignite.configuration.CacheConfiguration">
+ <property name="atomicityMode" value="ATOMIC"/>
+ <property name="backups" value="1"/>
+ </bean>
+
+ <!--
+ Partitioned cache example configuration.
+ -->
+ <bean class="org.apache.ignite.configuration.CacheConfiguration">
+ <property name="name" value="tx"/>
+ <property name="atomicityMode" value="TRANSACTIONAL"/>
+ <property name="backups" value="1"/>
+ </bean>
+ </list>
+ </property>
+
+ <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
+ <property name="discoverySpi">
+ <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+ <property name="ipFinder">
+ <!--
+ Ignite provides several options for automatic discovery that can be used
+ instead os static IP based discovery.
+ -->
+ <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
+ <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
+ <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
+ <property name="addresses">
+ <list>
+ <!-- In distributed environment, replace with actual host IP address. -->
+ <value>127.0.0.1:47500..47501</value>
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+ </property>
+ </bean>
+</beans>
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj b/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj
new file mode 100644
index 0000000..555e15a
--- /dev/null
+++ b/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj
@@ -0,0 +1,107 @@
+\ufeff<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>igniteexamples</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v100</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v100</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\..\include;..\..\..\..\jni\os\win\include;..\..\..\..\jni\include;..\..\..\..\common\os\win\include;..\..\..\..\common\include;..\..\..\..\binary\include;..\..\..\..\core\os\win\include;..\..\..\..\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.jni.lib;ignite.binary.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\..\..\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ </Link>
+ <PostBuildEvent>
+ <Command>copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.jni.dll" "$(OutDir)"
+copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\..\include;..\..\..\..\jni\os\win\include;..\..\..\..\jni\include;..\..\..\..\common\os\win\include;..\..\..\..\common\include;..\..\..\..\binary\include;..\..\..\..\core\os\win\include;..\..\..\..\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.jni.lib;ignite.binary.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\..\..\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ </Link>
+ <PostBuildEvent>
+ <Command>copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.jni.dll" "$(OutDir)"
+copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\putget_example.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\include\ignite\examples\address.h" />
+ <ClInclude Include="..\..\..\include\ignite\examples\organization.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj.filters b/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj.filters
new file mode 100644
index 0000000..1bcaff5
--- /dev/null
+++ b/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj.filters
@@ -0,0 +1,30 @@
+\ufeff<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\putget_example.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\include\ignite\examples\address.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\ignite\examples\organization.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/examples/putget-example/src/putget_example.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/putget-example/src/putget_example.cpp b/modules/platforms/cpp/examples/putget-example/src/putget_example.cpp
new file mode 100644
index 0000000..0b57886
--- /dev/null
+++ b/modules/platforms/cpp/examples/putget-example/src/putget_example.cpp
@@ -0,0 +1,126 @@
+/*
+ * 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 <iostream>
+
+#include "ignite/ignite.h"
+#include "ignite/ignition.h"
+
+#include "ignite/examples/organization.h"
+
+using namespace ignite;
+using namespace cache;
+
+using namespace examples;
+
+/*
+ * Execute individual Put and Get operations.
+ *
+ * @param cache Cache instance.
+ */
+void PutGet(Cache<int, Organization>& cache)
+{
+ // Create new Organization to store in cache.
+ Organization org("Microsoft", Address("1096 Eddy Street, San Francisco, CA", 94109));
+
+ // Put organization to cache.
+ cache.Put(1, org);
+
+ // Get recently created employee as a strongly-typed fully de-serialized instance.
+ Organization orgFromCache = cache.Get(1);
+
+ std::cout << ">>> Retrieved organization instance from cache: " << std::endl;
+ std::cout << orgFromCache.ToString() << std::endl;
+ std::cout << std::endl;
+}
+
+/*
+ * Execute bulk Put and Get operations.
+ */
+void PutGetAll(Cache<int, Organization>& cache)
+{
+ // Create new Organizations to store in cache.
+ Organization org1("Microsoft", Address("1096 Eddy Street, San Francisco, CA", 94109));
+ Organization org2("Red Cross", Address("184 Fidler Drive, San Antonio, TX", 78205));
+
+ // Put created data entries to cache.
+ std::map<int, Organization> vals;
+
+ vals[1] = org1;
+ vals[2] = org2;
+
+ cache.PutAll(vals);
+
+ // Get recently created organizations as a strongly-typed fully de-serialized instances.
+ std::set<int> keys;
+
+ keys.insert(1);
+ keys.insert(2);
+
+ std::map<int, Organization> valsFromCache = cache.GetAll(keys);
+
+ std::cout << ">>> Retrieved organization instances from cache: " << std::endl;
+
+ for (std::map<int, Organization>::iterator it = valsFromCache.begin(); it != valsFromCache.end(); ++it)
+ std::cout << it->second.ToString() << std::endl;
+
+ std::cout << std::endl;
+}
+
+int main()
+{
+ IgniteConfiguration cfg;
+
+ cfg.jvmInitMem = 512;
+ cfg.jvmMaxMem = 512;
+
+ cfg.springCfgPath = "platforms/cpp/examples/putget-example/config/example-cache.xml";
+
+ try
+ {
+ // Start a node.
+ Ignite grid = Ignition::Start(cfg);
+
+ std::cout << std::endl;
+ std::cout << ">>> Cache put-get example started." << std::endl;
+ std::cout << std::endl;
+
+ // Get cache instance.
+ Cache<int, Organization> cache = grid.GetCache<int, Organization>(NULL);
+
+ // Clear cache.
+ cache.Clear();
+
+ PutGet(cache);
+ PutGetAll(cache);
+
+ // Stop node.
+ Ignition::StopAll(false);
+ }
+ catch (IgniteError& err)
+ {
+ std::cout << "An error occurred: " << err.GetText() << std::endl;
+ }
+
+ std::cout << std::endl;
+ std::cout << ">>> Example finished, press any key to exit ..." << std::endl;
+ std::cout << std::endl;
+
+ std::cin.get();
+
+ return 0;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/examples/src/putgetexample.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/src/putgetexample.cpp b/modules/platforms/cpp/examples/src/putgetexample.cpp
deleted file mode 100644
index 206a2f4..0000000
--- a/modules/platforms/cpp/examples/src/putgetexample.cpp
+++ /dev/null
@@ -1,126 +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 <iostream>
-
-#include "ignite/ignite.h"
-#include "ignite/ignition.h"
-
-#include "ignite/examples/organization.h"
-
-using namespace ignite;
-using namespace cache;
-
-using namespace examples;
-
-/*
- * Execute individual Put and Get operations.
- *
- * @param cache Cache instance.
- */
-void PutGet(Cache<int, Organization>& cache)
-{
- // Create new Organization to store in cache.
- Organization org("Microsoft", Address("1096 Eddy Street, San Francisco, CA", 94109));
-
- // Put organization to cache.
- cache.Put(1, org);
-
- // Get recently created employee as a strongly-typed fully de-serialized instance.
- Organization orgFromCache = cache.Get(1);
-
- std::cout << ">>> Retrieved organization instance from cache: " << std::endl;
- std::cout << orgFromCache.ToString() << std::endl;
- std::cout << std::endl;
-}
-
-/*
- * Execute bulk Put and Get operations.
- */
-void PutGetAll(Cache<int, Organization>& cache)
-{
- // Create new Organizations to store in cache.
- Organization org1("Microsoft", Address("1096 Eddy Street, San Francisco, CA", 94109));
- Organization org2("Red Cross", Address("184 Fidler Drive, San Antonio, TX", 78205));
-
- // Put created data entries to cache.
- std::map<int, Organization> vals;
-
- vals[1] = org1;
- vals[2] = org2;
-
- cache.PutAll(vals);
-
- // Get recently created organizations as a strongly-typed fully de-serialized instances.
- std::set<int> keys;
-
- keys.insert(1);
- keys.insert(2);
-
- std::map<int, Organization> valsFromCache = cache.GetAll(keys);
-
- std::cout << ">>> Retrieved organization instances from cache: " << std::endl;
-
- for (std::map<int, Organization>::iterator it = valsFromCache.begin(); it != valsFromCache.end(); ++it)
- std::cout << it->second.ToString() << std::endl;
-
- std::cout << std::endl;
-}
-
-int main()
-{
- IgniteConfiguration cfg;
-
- cfg.jvmInitMem = 512;
- cfg.jvmMaxMem = 512;
-
- cfg.springCfgPath = "platforms/cpp/examples/config/example-cache.xml";
-
- try
- {
- // Start a node.
- Ignite grid = Ignition::Start(cfg);
-
- std::cout << std::endl;
- std::cout << ">>> Cache put-get example started." << std::endl;
- std::cout << std::endl;
-
- // Get cache instance.
- Cache<int, Organization> cache = grid.GetCache<int, Organization>(NULL);
-
- // Clear cache.
- cache.Clear();
-
- PutGet(cache);
- PutGetAll(cache);
-
- // Stop node.
- Ignition::StopAll(false);
- }
- catch (IgniteError& err)
- {
- std::cout << "An error occurred: " << err.GetText() << std::endl;
- }
-
- std::cout << std::endl;
- std::cout << ">>> Example finished, press any key to exit ..." << std::endl;
- std::cout << std::endl;
-
- std::cin.get();
-
- return 0;
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/ignite/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/ignite/Makefile.am b/modules/platforms/cpp/ignite/Makefile.am
index ad405da..625f1df 100644
--- a/modules/platforms/cpp/ignite/Makefile.am
+++ b/modules/platforms/cpp/ignite/Makefile.am
@@ -15,19 +15,39 @@
## limitations under the License.
##
-ACLOCAL_AMFLAGS = "-Im4"
-
-SUBDIRS = .
-DIST_SUBDIRS = .
-
-AM_CPPFLAGS = -I$(srcdir)/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -DIGNITE_IMPL
-AM_CXXFLAGS = -Wall -std=c++0x
+ACLOCAL_AMFLAGS =-I m4
noinst_PROGRAMS = ignite
-ignite_SOURCES = src/ignite.cpp
-
-ignite_LDFLAGS = -static-libtool-libs -L/usr/local/lib -lignite
+AM_CPPFLAGS = \
+ -I$(srcdir)/include \
+ -I@top_srcdir@/core/include \
+ -I@top_srcdir@/core/os/linux/include \
+ -I@top_srcdir@/common/include \
+ -I@top_srcdir@/common/os/linux/include \
+ -I@top_srcdir@/binary/include \
+ -I@top_srcdir@/jni/include \
+ -I@top_srcdir@/jni/os/linux/include \
+ -I$(JAVA_HOME)/include \
+ -I$(JAVA_HOME)/include/linux \
+ -DIGNITE_IMPL
+
+AM_CXXFLAGS = \
+ -Wall \
+ -std=c++0x
+
+ignite_LDADD = \
+ @top_srcdir@/core/libignite.la \
+ -lpthread
+
+ignite_LDFLAGS = \
+ -static-libtool-libs
+
+ignite_SOURCES = \
+ src/ignite.cpp
+
+ignite_DEPENDENCIES = \
+ @top_srcdir@/core/libignite.la
run-check: check
./ignite
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/ignite/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/ignite/configure.ac b/modules/platforms/cpp/ignite/configure.ac
deleted file mode 100644
index 9ffbe51..0000000
--- a/modules/platforms/cpp/ignite/configure.ac
+++ /dev/null
@@ -1,62 +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.
-#
-
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ([2.69])
-AC_INIT([Apache Ignite C++ Runner], [1.6.0.8653], [dev@ignite.apache.org], [ignite], [ignite.apache.org])
-AC_CONFIG_SRCDIR(src)
-
-AC_CANONICAL_SYSTEM
-AC_CONFIG_MACRO_DIR([m4])
-AC_LANG([C++])
-
-# Initialize automake
-AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
-AC_CONFIG_HEADER(config.h)
-
-AM_PROG_AR
-
-# Checks for programs.
-GXX="-g -O2"
-
-AC_PROG_CXX
-
-# Initialize Libtool
-LT_INIT
-
-# Checks for libraries.
-AC_CHECK_LIB([pthread], [pthread_mutex_lock])
-
-# Checks for header files.
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_INLINE
-AC_TYPE_INT16_T
-AC_TYPE_INT32_T
-AC_TYPE_INT64_T
-AC_TYPE_INT8_T
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-
-# Checks for library functions.
-AC_FUNC_ERROR_AT_LINE
-
-AC_CONFIG_FILES(Makefile)
-
-AC_OUTPUT
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/ignite/project/vs/ignite.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/ignite/project/vs/ignite.vcxproj b/modules/platforms/cpp/ignite/project/vs/ignite.vcxproj
index 4ce915e..6b6bed3 100644
--- a/modules/platforms/cpp/ignite/project/vs/ignite.vcxproj
+++ b/modules/platforms/cpp/ignite/project/vs/ignite.vcxproj
@@ -1,5 +1,5 @@
\ufeff<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -70,27 +70,30 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <LinkIncremental>true</LinkIncremental>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <LinkIncremental>
- </LinkIncremental>
+ <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LinkIncremental>false</LinkIncremental>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <LinkIncremental>false</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
- <SDLCheck>true</SDLCheck>
- <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\core\include;$(ProjectDir)\..\..\..\core\os\win\include;$(BOOST_HOME)</AdditionalIncludeDirectories>
+ <SDLCheck>true</SDLCheck>
+ <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\jni\include;$(ProjectDir)\..\..\..\jni\os\win\include;$(ProjectDir)\..\..\..\binary\include;$(ProjectDir)\..\..\..\binary\os\win\include;$(ProjectDir)\..\..\..\core\include;$(ProjectDir)\..\..\..\core\os\win\include;$(BOOST_HOME)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;IGNITE_IMPL;_CRT_SECURE_NO_WARNINGS;IGNITE_FRIEND;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ExceptionHandling>Async</ExceptionHandling>
+ <ExceptionHandling>Async</ExceptionHandling>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@@ -102,9 +105,9 @@
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
- <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\core\include;$(ProjectDir)\..\..\..\core\os\win\include;$(BOOST_HOME)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\jni\include;$(ProjectDir)\..\..\..\jni\os\win\include;$(ProjectDir)\..\..\..\binary\include;$(ProjectDir)\..\..\..\binary\os\win\include;$(ProjectDir)\..\..\..\core\include;$(ProjectDir)\..\..\..\core\os\win\include;$(BOOST_HOME)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;IGNITE_IMPL;_CRT_SECURE_NO_WARNINGS;IGNITE_FRIEND;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ExceptionHandling>Async</ExceptionHandling>
+ <ExceptionHandling>Async</ExceptionHandling>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -118,9 +121,9 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
- <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\core\include;$(ProjectDir)\..\..\..\core\os\win\include;$(BOOST_HOME)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\jni\include;$(ProjectDir)\..\..\..\jni\os\win\include;$(ProjectDir)\..\..\..\binary\include;$(ProjectDir)\..\..\..\binary\os\win\include;$(ProjectDir)\..\..\..\core\include;$(ProjectDir)\..\..\..\core\os\win\include;$(BOOST_HOME)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;IGNITE_IMPL;_CRT_SECURE_NO_WARNINGS;IGNITE_FRIEND;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ExceptionHandling>Async</ExceptionHandling>
+ <ExceptionHandling>Async</ExceptionHandling>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@@ -135,10 +138,10 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <SDLCheck>true</SDLCheck>
- <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\core\include;$(ProjectDir)\..\..\..\core\os\win\include;$(BOOST_HOME)</AdditionalIncludeDirectories>
+ <SDLCheck>true</SDLCheck>
+ <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\..\common\include;$(ProjectDir)\..\..\..\common\os\win\include;$(ProjectDir)\..\..\..\jni\include;$(ProjectDir)\..\..\..\jni\os\win\include;$(ProjectDir)\..\..\..\binary\include;$(ProjectDir)\..\..\..\binary\os\win\include;$(ProjectDir)\..\..\..\core\include;$(ProjectDir)\..\..\..\core\os\win\include;$(BOOST_HOME)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;IGNITE_IMPL;_CRT_SECURE_NO_WARNINGS;IGNITE_FRIEND;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ExceptionHandling>Async</ExceptionHandling>
+ <ExceptionHandling>Async</ExceptionHandling>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@@ -154,12 +157,12 @@
<ClCompile Include="..\..\src\ignite.cpp" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\..\common\project\vs\common.vcxproj">
- <Project>{4f7e4917-4612-4b96-9838-025711ade391}</Project>
- </ProjectReference>
<ProjectReference Include="..\..\..\core\project\vs\core.vcxproj">
<Project>{e2dea693-f2ea-43c2-a813-053378f6e4db}</Project>
</ProjectReference>
+ <ProjectReference Include="..\..\..\jni\project\vs\jni.vcxproj">
+ <Project>{4f7e4917-4612-4b96-9838-025711ade391}</Project>
+ </ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/ignite/project/vs/ignite.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/ignite/project/vs/ignite.vcxproj.filters b/modules/platforms/cpp/ignite/project/vs/ignite.vcxproj.filters
index f39c60a..407024b 100644
--- a/modules/platforms/cpp/ignite/project/vs/ignite.vcxproj.filters
+++ b/modules/platforms/cpp/ignite/project/vs/ignite.vcxproj.filters
@@ -5,14 +5,6 @@
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
- <Filter Include="Headers">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resources">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
- </Filter>
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/ignite/src/ignite.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/ignite/src/ignite.cpp b/modules/platforms/cpp/ignite/src/ignite.cpp
index 56860b3..8e20bf4 100644
--- a/modules/platforms/cpp/ignite/src/ignite.cpp
+++ b/modules/platforms/cpp/ignite/src/ignite.cpp
@@ -30,7 +30,7 @@ typedef std::set<std::string> StringSet;
namespace config
{
- using ignite::common::util::ToLower;
+ using ignite::common::ToLower;
/** Command line argument: Ignite home. */
const std::string CmdIgniteHome = ToLower("-IgniteHome=");
@@ -61,7 +61,7 @@ namespace config
*/
void ToArgs(const ignite::IgniteConfiguration& cfg, StringList& args)
{
- using ignite::common::util::LongToString;
+ using ignite::common::LongToString;
if (!cfg.igniteHome.empty())
args.push_back(CmdIgniteHome + cfg.igniteHome);
@@ -93,7 +93,7 @@ namespace config
*/
void Configure(ignite::IgniteConfiguration& cfg, const StringList& src)
{
- using ignite::common::util::ParseInt;
+ using ignite::common::ParseInt;
StringList jvmOpts;
@@ -177,7 +177,7 @@ int main(int argc, const char* argv[])
// Check for special cases.
if (!args.empty())
{
- using ignite::common::util::ToLower;
+ using ignite::common::ToLower;
std::string first = ToLower(args.front());
@@ -201,7 +201,7 @@ int main(int argc, const char* argv[])
if (igniteImpl)
{
- ignite::common::java::JniContext* context = igniteImpl->GetContext();
+ ignite::jni::java::JniContext* context = igniteImpl->GetContext();
if (context)
{
context->DestroyJvm();
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/jni/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/jni/Makefile.am b/modules/platforms/cpp/jni/Makefile.am
new file mode 100644
index 0000000..b9b3913
--- /dev/null
+++ b/modules/platforms/cpp/jni/Makefile.am
@@ -0,0 +1,62 @@
+##
+## 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.
+##
+
+ACLOCAL_AMFLAGS =-I m4
+
+SUBDIRS = \
+ include
+
+lib_LTLIBRARIES = libignite-jni.la
+
+AM_CPPFLAGS = \
+ -I$(srcdir)/include \
+ -I$(srcdir)/os/linux/include \
+ -I@top_srcdir@/common/include \
+ -I@top_srcdir@/common/os/linux/include \
+ -I$(JAVA_HOME)/include \
+ -I$(JAVA_HOME)/include/linux \
+ -DIGNITE_IMPL
+
+AM_CXXFLAGS = \
+ -Wall \
+ -std=c++0x
+
+libignite_jni_la_LIBADD = \
+ -L$(JAVA_HOME)/jre/lib/amd64/server \
+ @top_srcdir@/common/libignite-common.la
+
+libignite_jni_la_LDFLAGS = \
+ -no-undefined \
+ -ljvm \
+ -version-info 0:0:0 \
+ -release $(PACKAGE_VERSION)
+
+libignite_jni_la_DEPENDENCIES = \
+ @top_srcdir@/common/libignite-common.la
+
+libignite_jni_la_SOURCES = \
+ os/linux/src/utils.cpp \
+ src/java.cpp \
+ src/exports.cpp
+
+clean-local:
+ $(RM) *.gcno *.gcda
+
+clean-docs:
+ $(RM) $(DX_CLEANFILES)
+
+
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/jni/include/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/jni/include/Makefile.am b/modules/platforms/cpp/jni/include/Makefile.am
new file mode 100644
index 0000000..ad64a87
--- /dev/null
+++ b/modules/platforms/cpp/jni/include/Makefile.am
@@ -0,0 +1,25 @@
+##
+## 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.
+##
+
+ACLOCAL_AMFLAGS =-I m4
+
+nobase_include_HEADERS = \
+ ignite/jni/java.h \
+ ignite/jni/exports.h
+
+uninstall-hook:
+ if [ -d ${includedir}/ignite ]; then find ${includedir}/ignite -type d -empty -delete; fi
http://git-wip-us.apache.org/repos/asf/ignite/blob/764c97b9/modules/platforms/cpp/jni/include/ignite/jni/exports.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/jni/include/ignite/jni/exports.h b/modules/platforms/cpp/jni/include/ignite/jni/exports.h
new file mode 100644
index 0000000..bcfc213
--- /dev/null
+++ b/modules/platforms/cpp/jni/include/ignite/jni/exports.h
@@ -0,0 +1,185 @@
+/*
+ * 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_JNI_EXPORTS
+#define _IGNITE_JNI_EXPORTS
+
+#include "ignite/jni/java.h"
+
+namespace gcj = ignite::jni::java;
+
+extern "C" {
+ int IGNITE_CALL IgniteReallocate(long long memPtr, int cap);
+
+ 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);
+ void* IGNITE_CALL IgniteProcessorProjection(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteProcessorCache(gcj::JniContext* ctx, void* obj, char* name);
+ void* IGNITE_CALL IgniteProcessorCreateCache(gcj::JniContext* ctx, void* obj, char* name);
+ void* IGNITE_CALL IgniteProcessorGetOrCreateCache(gcj::JniContext* ctx, void* obj, char* name);
+ void* IGNITE_CALL IgniteProcessorCreateCacheFromConfig(gcj::JniContext* ctx, void* obj, long long memPtr);
+ void* IGNITE_CALL IgniteProcessorGetOrCreateCacheFromConfig(gcj::JniContext* ctx, void* obj, long long memPtr);
+ void* IGNITE_CALL IgniteProcessorCreateNearCache(gcj::JniContext* ctx, void* obj, char* name, long long memPtr);
+ void* IGNITE_CALL IgniteProcessorGetOrCreateNearCache(gcj::JniContext* ctx, void* obj, char* name, long long memPtr);
+ void IGNITE_CALL IgniteProcessorDestroyCache(gcj::JniContext* ctx, void* obj, char* name);
+ void* IGNITE_CALL IgniteProcessorAffinity(gcj::JniContext* ctx, void* obj, char* name);
+ void* IGNITE_CALL IgniteProcessorDataStreamer(gcj::JniContext* ctx, void* obj, char* name, bool keepPortable);
+ void* IGNITE_CALL IgniteProcessorTransactions(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteProcessorCompute(gcj::JniContext* ctx, void* obj, void* prj);
+ void* IGNITE_CALL IgniteProcessorMessage(gcj::JniContext* ctx, void* obj, void* prj);
+ void* IGNITE_CALL IgniteProcessorEvents(gcj::JniContext* ctx, void* obj, void* prj);
+ void* IGNITE_CALL IgniteProcessorServices(gcj::JniContext* ctx, void* obj, void* prj);
+ void* IGNITE_CALL IgniteProcessorExtensions(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteProcessorAtomicLong(gcj::JniContext* ctx, void* obj, char* name, long long initVal, bool create);
+ void* IGNITE_CALL IgniteProcessorAtomicSequence(gcj::JniContext* ctx, void* obj, char* name, long long initVal, bool create);
+ void* IGNITE_CALL IgniteProcessorAtomicReference(gcj::JniContext* ctx, void* obj, char* name, long long memPtr, bool create);
+ void IGNITE_CALL IgniteProcessorGetIgniteConfiguration(gcj::JniContext* ctx, void* obj, long long memPtr);
+ void IGNITE_CALL IgniteProcessorGetCacheNames(gcj::JniContext* ctx, void* obj, long long memPtr);
+
+ long long IGNITE_CALL IgniteTargetInStreamOutLong(gcj::JniContext* ctx, void* obj, int opType, long long memPtr);
+ void IGNITE_CALL IgniteTargetInStreamOutStream(gcj::JniContext* ctx, void* obj, int opType, long long inMemPtr, long long outMemPtr);
+ void* IGNITE_CALL IgniteTargetInStreamOutObject(gcj::JniContext* ctx, void* obj, int opType, long long memPtr);
+ void IGNITE_CALL IgniteTargetInObjectStreamOutStream(gcj::JniContext* ctx, void* obj, int opType, void* arg, long long inMemPtr, long long outMemPtr);
+ long long IGNITE_CALL IgniteTargetOutLong(gcj::JniContext* ctx, void* obj, int opType);
+ void IGNITE_CALL IgniteTargetOutStream(gcj::JniContext* ctx, void* obj, int opType, long long memPtr);
+ void* IGNITE_CALL IgniteTargetOutObject(gcj::JniContext* ctx, void* obj, int opType);
+ void IGNITE_CALL IgniteTargetListenFuture(gcj::JniContext* ctx, void* obj, long long futId, int typ);
+ void IGNITE_CALL IgniteTargetListenFutureForOperation(gcj::JniContext* ctx, void* obj, long long futId, int typ, int opId);
+ void* IGNITE_CALL IgniteTargetListenFutureAndGet(gcj::JniContext* ctx, void* obj, long long futId, int typ);
+ void* IGNITE_CALL IgniteTargetListenFutureForOperationAndGet(gcj::JniContext* ctx, void* obj, long long futId, int typ, int opId);
+
+ int IGNITE_CALL IgniteAffinityPartitions(gcj::JniContext* ctx, void* obj);
+
+ void* IGNITE_CALL IgniteCacheWithSkipStore(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteCacheWithNoRetries(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteCacheWithExpiryPolicy(gcj::JniContext* ctx, void* obj, long long create, long long update, long long access);
+ void* IGNITE_CALL IgniteCacheWithAsync(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteCacheWithKeepPortable(gcj::JniContext* ctx, void* obj);
+ void IGNITE_CALL IgniteCacheClear(gcj::JniContext* ctx, void* obj);
+ void IGNITE_CALL IgniteCacheRemoveAll(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteCacheOutOpQueryCursor(gcj::JniContext* ctx, void* obj, int type, long long memPtr);
+ void* IGNITE_CALL IgniteCacheOutOpContinuousQuery(gcj::JniContext* ctx, void* obj, int type, long long memPtr);
+ void* IGNITE_CALL IgniteCacheIterator(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteCacheLocalIterator(gcj::JniContext* ctx, void* obj, int peekModes);
+ void IGNITE_CALL IgniteCacheEnterLock(gcj::JniContext* ctx, void* obj, long long id);
+ void IGNITE_CALL IgniteCacheExitLock(gcj::JniContext* ctx, void* obj, long long id);
+ bool IGNITE_CALL IgniteCacheTryEnterLock(gcj::JniContext* ctx, void* obj, long long id, long long timeout);
+ void IGNITE_CALL IgniteCacheCloseLock(gcj::JniContext* ctx, void* obj, long long id);
+ void IGNITE_CALL IgniteCacheRebalance(gcj::JniContext* ctx, void* obj, long long futId);
+ int IGNITE_CALL IgniteCacheSize(gcj::JniContext* ctx, void* obj, int peekModes, bool loc);
+
+ void IGNITE_CALL IgniteCacheStoreCallbackInvoke(gcj::JniContext* ctx, void* obj, long long memPtr);
+
+ void IGNITE_CALL IgniteComputeWithNoFailover(gcj::JniContext* ctx, void* obj);
+ void IGNITE_CALL IgniteComputeWithTimeout(gcj::JniContext* ctx, void* obj, long long timeout);
+ void* IGNITE_CALL IgniteComputeExecuteNative(gcj::JniContext* ctx, void* obj, long long taskPtr, long long topVer);
+
+ void IGNITE_CALL IgniteContinuousQueryClose(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteContinuousQueryGetInitialQueryCursor(gcj::JniContext* ctx, void* obj);
+
+ void IGNITE_CALL IgniteDataStreamerListenTopology(gcj::JniContext* ctx, void* obj, long long ptr);
+ bool IGNITE_CALL IgniteDataStreamerAllowOverwriteGet(gcj::JniContext* ctx, void* obj);
+ void IGNITE_CALL IgniteDataStreamerAllowOverwriteSet(gcj::JniContext* ctx, void* obj, bool val);
+ bool IGNITE_CALL IgniteDataStreamerSkipStoreGet(gcj::JniContext* ctx, void* obj);
+ void IGNITE_CALL IgniteDataStreamerSkipStoreSet(gcj::JniContext* ctx, void* obj, bool val);
+ int IGNITE_CALL IgniteDataStreamerPerNodeBufferSizeGet(gcj::JniContext* ctx, void* obj);
+ void IGNITE_CALL IgniteDataStreamerPerNodeBufferSizeSet(gcj::JniContext* ctx, void* obj, int val);
+ int IGNITE_CALL IgniteDataStreamerPerNodeParallelOperationsGet(gcj::JniContext* ctx, void* obj);
+ void IGNITE_CALL IgniteDataStreamerPerNodeParallelOperationsSet(gcj::JniContext* ctx, void* obj, int val);
+
+ void* IGNITE_CALL IgniteMessagingWithAsync(gcj::JniContext* ctx, void* obj);
+
+ void* IGNITE_CALL IgniteProjectionForOthers(gcj::JniContext* ctx, void* obj, void* prj);
+ void* IGNITE_CALL IgniteProjectionForRemotes(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteProjectionForDaemons(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteProjectionForRandom(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteProjectionForOldest(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteProjectionForYoungest(gcj::JniContext* ctx, void* obj);
+ void IGNITE_CALL IgniteProjectionResetMetrics(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteProjectionOutOpRet(gcj::JniContext* ctx, void* obj, int type, long long memPtr);
+
+ void IGNITE_CALL IgniteQueryCursorIterator(gcj::JniContext* ctx, void* obj);
+ void IGNITE_CALL IgniteQueryCursorClose(gcj::JniContext* ctx, void* obj);
+
+ long long IGNITE_CALL IgniteTransactionsStart(gcj::JniContext* ctx, void* obj, int concurrency, int isolation, long long timeout, int txSize);
+ int IGNITE_CALL IgniteTransactionsCommit(gcj::JniContext* ctx, void* obj, long long id);
+ void IGNITE_CALL IgniteTransactionsCommitAsync(gcj::JniContext* ctx, void* obj, long long id, long long futId);
+ int IGNITE_CALL IgniteTransactionsRollback(gcj::JniContext* ctx, void* obj, long long id);
+ void IGNITE_CALL IgniteTransactionsRollbackAsync(gcj::JniContext* ctx, void* obj, long long id, long long futId);
+ int IGNITE_CALL IgniteTransactionsClose(gcj::JniContext* ctx, void* obj, long long id);
+ int IGNITE_CALL IgniteTransactionsState(gcj::JniContext* ctx, void* obj, long long id);
+ bool IGNITE_CALL IgniteTransactionsSetRollbackOnly(gcj::JniContext* ctx, void* obj, long long id);
+ void IGNITE_CALL IgniteTransactionsResetMetrics(gcj::JniContext* ctx, void* obj);
+
+ void* IGNITE_CALL IgniteAcquire(gcj::JniContext* ctx, void* obj);
+ void IGNITE_CALL IgniteRelease(void* obj);
+
+ void IGNITE_CALL IgniteThrowToJava(gcj::JniContext* ctx, char* errMsg);
+
+ int IGNITE_CALL IgniteHandlersSize();
+
+ void* IGNITE_CALL IgniteCreateContext(char** opts, int optsLen, gcj::JniHandlers* cbs);
+ void IGNITE_CALL IgniteDeleteContext(gcj::JniContext* ctx);
+
+ void IGNITE_CALL IgniteDestroyJvm(gcj::JniContext* ctx);
+
+ void* IGNITE_CALL IgniteEventsWithAsync(gcj::JniContext* ctx, void* obj);
+ bool IGNITE_CALL IgniteEventsStopLocalListen(gcj::JniContext* ctx, void* obj, long long hnd);
+ void IGNITE_CALL IgniteEventsLocalListen(gcj::JniContext* ctx, void* obj, long long hnd, int type);
+ bool IGNITE_CALL IgniteEventsIsEnabled(gcj::JniContext* ctx, void* obj, int type);
+
+ void* IGNITE_CALL IgniteServicesWithAsync(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteServicesWithServerKeepPortable(gcj::JniContext* ctx, void* obj);
+ void IGNITE_CALL IgniteServicesCancel(gcj::JniContext* ctx, void* obj, char* name);
+ void IGNITE_CALL IgniteServicesCancelAll(gcj::JniContext* ctx, void* obj);
+ void* IGNITE_CALL IgniteServicesGetServiceProxy(gcj::JniContext* ctx, void* obj, char* name, bool sticky);
+
+ long long IGNITE_CALL IgniteAtomicLongGet(gcj::JniContext* ctx, void* obj);
+ long long IGNITE_CALL IgniteAtomicLongIncrementAndGet(gcj::JniContext* ctx, void* obj);
+ long long IGNITE_CALL IgniteAtomicLongGetAndIncrement(gcj::JniContext* ctx, void* obj);
+ long long IGNITE_CALL IgniteAtomicLongAddAndGet(gcj::JniContext* ctx, void* obj, long long value);
+ long long IGNITE_CALL IgniteAtomicLongGetAndAdd(gcj::JniContext* ctx, void* obj, long long value);
+ long long IGNITE_CALL IgniteAtomicLongDecrementAndGet(gcj::JniContext* ctx, void* obj);
+ long long IGNITE_CALL IgniteAtomicLongGetAndDecrement(gcj::JniContext* ctx, void* obj);
+ long long IGNITE_CALL IgniteAtomicLongGetAndSet(gcj::JniContext* ctx, void* obj, long long value);
+ long long IGNITE_CALL IgniteAtomicLongCompareAndSetAndGet(gcj::JniContext* ctx, void* obj, long long expVal, long long newVal);
+ bool IGNITE_CALL IgniteAtomicLongIsClosed(gcj::JniContext* ctx, void* obj);
+ void IGNITE_CALL IgniteAtomicLongClose(gcj::JniContext* ctx, void* obj);
+
+ long long IGNITE_CALL IgniteAtomicSequenceGet(gcj::JniContext* ctx, void* obj);
+ long long IGNITE_CALL IgniteAtomicSequenceIncrementAndGet(gcj::JniContext* ctx, void* obj);
+ long long IGNITE_CALL IgniteAtomicSequenceGetAndIncrement(gcj::JniContext* ctx, void* obj);
+ long long IGNITE_CALL IgniteAtomicSequenceAddAndGet(gcj::JniContext* ctx, void* obj, long long l);
+ long long IGNITE_CALL IgniteAtomicSequenceGetAndAdd(gcj::JniContext* ctx, void* obj, long long l);
+ int IGNITE_CALL IgniteAtomicSequenceGetBatchSize(gcj::JniContext* ctx, void* obj);
+ void IGNITE_CALL IgniteAtomicSequenceSetBatchSize(gcj::JniContext* ctx, void* obj, int size);
+ bool IGNITE_CALL IgniteAtomicSequenceIsClosed(gcj::JniContext* ctx, void* obj);
+ void IGNITE_CALL IgniteAtomicSequenceClose(gcj::JniContext* ctx, void* obj);
+
+ bool IGNITE_CALL IgniteAtomicReferenceIsClosed(gcj::JniContext* ctx, void* obj);
+ void IGNITE_CALL IgniteAtomicReferenceClose(gcj::JniContext* ctx, void* obj);
+
+ bool IGNITE_CALL IgniteListenableCancel(gcj::JniContext* ctx, void* obj);
+ bool IGNITE_CALL IgniteListenableIsCancelled(gcj::JniContext* ctx, void* obj);
+}
+
+#endif //_IGNITE_JNI_EXPORTS
\ No newline at end of file