blob: bd07e1330dce9c3fa7f7405e4d0f01c5fe2e83f2 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<link rel="canonical" href="https://ignite.apache.org/releases/2.10.0/javadoc/org/apache/ignite/Ignition.html" />
<META NAME="ROBOTS" CONTENT="NOINDEX">
<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
ym(72949126, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/72949126" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
<script type='text/javascript'>
window.__lo_site_id = 284467;
(function() {
var wa = document.createElement('script'); wa.type = 'text/javascript'; wa.async = true;
wa.src = 'https://d10lpsik1i8c69.cloudfront.net/w.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wa, s);
})();
</script>
<!-- Generated by javadoc (1.8.0_261) on Thu Mar 11 02:15:42 MSK 2021 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Ignition (Ignite 2.10.0)</title>
<meta name="date" content="2021-03-11">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
<link rel='shortcut icon' href='https://ignite.apache.org/favicon.ico'/>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-61232409-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-61232409-1');
</script></head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Ignition (Ignite 2.10.0)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Ignition.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/ignite/IgniteTransactions.html" title="interface in org.apache.ignite"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../org/apache/ignite/IgnitionListener.html" title="interface in org.apache.ignite"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/ignite/Ignition.html" target="_top">Frames</a></li>
<li><a href="Ignition.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.ignite</div>
<h2 title="Class Ignition" class="title">Class Ignition</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.ignite.Ignition</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">Ignition</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">This class defines a factory for the main Ignite API. It controls Grid life cycle
and allows listening for grid events.
<h1 class="header">Grid Loaders</h1>
Although user can apply grid factory directly to start and stop grid, grid is
often started and stopped by grid loaders. Grid loaders can be found in
<a href="../../../org/apache/ignite/startup/package-summary.html"><code>org.apache.ignite.startup</code></a> package, for example:
<ul>
<li><a href="../../../org/apache/ignite/startup/cmdline/CommandLineStartup.html" title="class in org.apache.ignite.startup.cmdline"><code>CommandLineStartup</code></a></li>
<li><a href="../../../org/apache/ignite/startup/servlet/ServletStartup.html"><code>ServletStartup</code></a></li>
</ul>
<h1 class="header">Examples</h1>
Use <a href="../../../org/apache/ignite/Ignition.html#start--"><code>start()</code></a> method to start grid with default configuration. You can also use
<a href="../../../org/apache/ignite/configuration/IgniteConfiguration.html" title="class in org.apache.ignite.configuration"><code>IgniteConfiguration</code></a> to override some default configuration. Below is an
example on how to start grid with custom configuration for <strong>URI deployment</strong>.
<pre name="code" class="java">
IgniteConfiguration cfg = new IgniteConfiguration();
GridUriDeployment deploySpi = new GridUriDeployment();
deploySpi.setUriList(Collections.singletonList("classes://tmp/output/classes"));
cfg.setDeploymentSpi(deploySpi);
Ignition.start(cfg);
</pre>
Here is how a grid instance can be configured from Spring XML configuration file. The
example below configures a grid instance with additional user attributes
(see <a href="../../../org/apache/ignite/cluster/ClusterNode.html#attributes--"><code>ClusterNode.attributes()</code></a>) and specifies a Ignite instance name:
<pre name="code" class="xml">
&lt;bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"&gt;
...
&lt;property name="igniteInstanceName" value="grid"/&gt;
&lt;property name="userAttributes"&gt;
&lt;map&gt;
&lt;entry key="group" value="worker"/&gt;
&lt;/map&gt;
&lt;/property&gt;
...
&lt;/bean&gt;
</pre>
A grid instance with Spring configuration above can be started as following. Note that
you do not need to pass path to Spring XML file if you are using
<code>IGNITE_HOME/config/default-config.xml</code>. Also note, that the path can be
absolute or relative to IGNITE_HOME.
<pre name="code" class="java">
...
Ignition.start("/path/to/spring/xml/file.xml");
...
</pre>
You can also instantiate grid directly from Spring without using <code>Ignition</code>.
For more information refer to <a href="../../../org/apache/ignite/IgniteSpringBean.html"><code>IgniteSpringBean</code></a> documentation.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#KILL_EXIT_CODE">KILL_EXIT_CODE</a></span></code>
<div class="block">This is kill code that can be used by external tools, like Shell scripts,
to auto-stop the Ignite JVM process without restarting.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#RESTART_EXIT_CODE">RESTART_EXIT_CODE</a></span></code>
<div class="block">This is restart code that can be used by external tools, like Shell scripts,
to auto-restart the Ignite JVM process.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#Ignition--">Ignition</a></span>()</code>
<div class="block">Enforces singleton.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#addListener-org.apache.ignite.IgnitionListener-">addListener</a></span>(<a href="../../../org/apache/ignite/IgnitionListener.html" title="interface in org.apache.ignite">IgnitionListener</a>&nbsp;lsnr)</code>
<div class="block">Adds a lsnr for grid life cycle events.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><span class='angle_bracket'>&lt;</span><a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a><span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#allGrids--">allGrids</a></span>()</code>
<div class="block">Gets a list of all grids started so far.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#getOrStart-org.apache.ignite.configuration.IgniteConfiguration-">getOrStart</a></span>(<a href="../../../org/apache/ignite/configuration/IgniteConfiguration.html" title="class in org.apache.ignite.configuration">IgniteConfiguration</a>&nbsp;cfg)</code>
<div class="block">Gets or starts new grid instance if it hasn't been started yet.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#ignite--">ignite</a></span>()</code>
<div class="block">Gets an instance of default no-name grid.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#ignite-java.lang.String-">ignite</a></span>(@Nullable <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</code>
<div class="block">Gets a named Ignite instance.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#ignite-java.util.UUID-">ignite</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>&nbsp;locNodeId)</code>
<div class="block">Gets a grid instance for given local node ID.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#isClientMode--">isClientMode</a></span>()</code>
<div class="block">Gets client mode thread-local flag.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#isDaemon--">isDaemon</a></span>()</code>
<div class="block">Gets daemon flag.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#kill-boolean-">kill</a></span>(boolean&nbsp;cancel)</code>
<div class="block">Stops <b>all</b> started grids.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static <span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#loadSpringBean-java.io.InputStream-java.lang.String-">loadSpringBean</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;springXmlStream,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;beanName)</code>
<div class="block">Loads Spring bean by its name from given Spring XML configuration file.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static <span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#loadSpringBean-java.lang.String-java.lang.String-">loadSpringBean</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;springXmlPath,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;beanName)</code>
<div class="block">Loads Spring bean by its name from given Spring XML configuration file.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static <span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#loadSpringBean-java.net.URL-java.lang.String-">loadSpringBean</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;springXmlUrl,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;beanName)</code>
<div class="block">Loads Spring bean by its name from given Spring XML configuration file.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static <a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#localIgnite--">localIgnite</a></span>()</code>
<div class="block">This method is used to address a local <a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite"><code>Ignite</code></a> instance, principally from closure.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#removeListener-org.apache.ignite.IgnitionListener-">removeListener</a></span>(<a href="../../../org/apache/ignite/IgnitionListener.html" title="interface in org.apache.ignite">IgnitionListener</a>&nbsp;lsnr)</code>
<div class="block">Removes lsnr added by <a href="../../../org/apache/ignite/Ignition.html#addListener-org.apache.ignite.IgnitionListener-"><code>addListener(IgnitionListener)</code></a> method.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#restart-boolean-">restart</a></span>(boolean&nbsp;cancel)</code>
<div class="block">Restarts <b>all</b> started grids.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#setClientMode-boolean-">setClientMode</a></span>(boolean&nbsp;clientMode)</code>
<div class="block">Sets client mode thread-local flag.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#setDaemon-boolean-">setDaemon</a></span>(boolean&nbsp;daemon)</code>
<div class="block">Sets daemon flag.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static <a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#start--">start</a></span>()</code>
<div class="block">Starts grid with default configuration.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static <a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#start-org.apache.ignite.configuration.IgniteConfiguration-">start</a></span>(<a href="../../../org/apache/ignite/configuration/IgniteConfiguration.html" title="class in org.apache.ignite.configuration">IgniteConfiguration</a>&nbsp;cfg)</code>
<div class="block">Starts grid with given configuration.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static <a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#start-java.io.InputStream-">start</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;springCfgStream)</code>
<div class="block">Starts all grids specified within given Spring XML configuration input stream.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static <a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#start-java.lang.String-">start</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;springCfgPath)</code>
<div class="block">Starts all grids specified within given Spring XML configuration file.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static <a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#start-java.net.URL-">start</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;springCfgUrl)</code>
<div class="block">Starts all grids specified within given Spring XML configuration file URL.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>static <a href="../../../org/apache/ignite/client/IgniteClient.html" title="interface in org.apache.ignite.client">IgniteClient</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#startClient-org.apache.ignite.configuration.ClientConfiguration-">startClient</a></span>(<a href="../../../org/apache/ignite/configuration/ClientConfiguration.html" title="class in org.apache.ignite.configuration">ClientConfiguration</a>&nbsp;cfg)</code>
<div class="block">Initializes new instance of <a href="../../../org/apache/ignite/client/IgniteClient.html" title="interface in org.apache.ignite.client"><code>IgniteClient</code></a>.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>static <a href="../../../org/apache/ignite/IgniteState.html" title="enum in org.apache.ignite">IgniteState</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#state--">state</a></span>()</code>
<div class="block">Gets state of grid default grid.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>static <a href="../../../org/apache/ignite/IgniteState.html" title="enum in org.apache.ignite">IgniteState</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#state-java.lang.String-">state</a></span>(@Nullable <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</code>
<div class="block">Gets states of named Ignite instance.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#stop-boolean-">stop</a></span>(boolean&nbsp;cancel)</code>
<div class="block">Stops default grid.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#stop-java.lang.String-boolean-">stop</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
boolean&nbsp;cancel)</code>
<div class="block">Stops named Ignite instance.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/Ignition.html#stopAll-boolean-">stopAll</a></span>(boolean&nbsp;cancel)</code>
<div class="block">Stops <b>all</b> started grids in current JVM.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="RESTART_EXIT_CODE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RESTART_EXIT_CODE</h4>
<pre>public static final&nbsp;int RESTART_EXIT_CODE</pre>
<div class="block">This is restart code that can be used by external tools, like Shell scripts,
to auto-restart the Ignite JVM process. Note that there is no standard way
for a JVM to restart itself from Java application and therefore we rely on
external tools to provide that capability.
<p>
Note that standard <tt>ignite.{sh|bat}</tt> scripts support restarting when
JVM process exits with this code.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.apache.ignite.Ignition.RESTART_EXIT_CODE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="KILL_EXIT_CODE">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>KILL_EXIT_CODE</h4>
<pre>public static final&nbsp;int KILL_EXIT_CODE</pre>
<div class="block">This is kill code that can be used by external tools, like Shell scripts,
to auto-stop the Ignite JVM process without restarting.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.apache.ignite.Ignition.KILL_EXIT_CODE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Ignition--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Ignition</h4>
<pre>protected&nbsp;Ignition()</pre>
<div class="block">Enforces singleton.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setDaemon-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDaemon</h4>
<pre>public static&nbsp;void&nbsp;setDaemon(boolean&nbsp;daemon)</pre>
<div class="block">Sets daemon flag.
<p>
If daemon flag is set then all grid instances created by the factory will be
daemon, i.e. the local node for these instances will be a daemon node. Note that
if daemon flag is set - it will override the same settings in <a href="../../../org/apache/ignite/configuration/IgniteConfiguration.html#isDaemon--"><code>IgniteConfiguration.isDaemon()</code></a>.
Note that you can set on and off daemon flag at will.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>daemon</code> - Daemon flag to set.</dd>
</dl>
</li>
</ul>
<a name="isDaemon--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDaemon</h4>
<pre>public static&nbsp;boolean&nbsp;isDaemon()</pre>
<div class="block">Gets daemon flag.
<p>
If daemon flag it set then all grid instances created by the factory will be
daemon, i.e. the local node for these instances will be a daemon node. Note that
if daemon flag is set - it will override the same settings in <a href="../../../org/apache/ignite/configuration/IgniteConfiguration.html#isDaemon--"><code>IgniteConfiguration.isDaemon()</code></a>.
Note that you can set on and off daemon flag at will.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Daemon flag.</dd>
</dl>
</li>
</ul>
<a name="setClientMode-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setClientMode</h4>
<pre>public static&nbsp;void&nbsp;setClientMode(boolean&nbsp;clientMode)</pre>
<div class="block">Sets client mode thread-local flag.
<p>
This flag used when node is started if <a href="../../../org/apache/ignite/configuration/IgniteConfiguration.html#isClientMode--"><code>IgniteConfiguration.isClientMode()</code></a>
is <code>null</code>. When <a href="../../../org/apache/ignite/configuration/IgniteConfiguration.html#isClientMode--"><code>IgniteConfiguration.isClientMode()</code></a> is set this flag is ignored.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>clientMode</code> - Client mode flag.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../org/apache/ignite/configuration/IgniteConfiguration.html#isClientMode--"><code>IgniteConfiguration.isClientMode()</code></a></dd>
</dl>
</li>
</ul>
<a name="isClientMode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isClientMode</h4>
<pre>public static&nbsp;boolean&nbsp;isClientMode()</pre>
<div class="block">Gets client mode thread-local flag.
<p>
This flag used when node is started if <a href="../../../org/apache/ignite/configuration/IgniteConfiguration.html#isClientMode--"><code>IgniteConfiguration.isClientMode()</code></a>
is <code>null</code>. When <a href="../../../org/apache/ignite/configuration/IgniteConfiguration.html#isClientMode--"><code>IgniteConfiguration.isClientMode()</code></a> is set this flag is ignored.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Client mode flag.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../org/apache/ignite/configuration/IgniteConfiguration.html#isClientMode--"><code>IgniteConfiguration.isClientMode()</code></a></dd>
</dl>
</li>
</ul>
<a name="state--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>state</h4>
<pre>public static&nbsp;<a href="../../../org/apache/ignite/IgniteState.html" title="enum in org.apache.ignite">IgniteState</a>&nbsp;state()</pre>
<div class="block">Gets state of grid default grid.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Default grid state.</dd>
</dl>
</li>
</ul>
<a name="state-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>state</h4>
<pre>public static&nbsp;<a href="../../../org/apache/ignite/IgniteState.html" title="enum in org.apache.ignite">IgniteState</a>&nbsp;state(@Nullable
@Nullable <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</pre>
<div class="block">Gets states of named Ignite instance. If name is <code>null</code>, then state of
default no-name Ignite instance is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - Ignite instance name. If name is <code>null</code>, then state of
default no-name Ignite instance is returned.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Ignite instance state.</dd>
</dl>
</li>
</ul>
<a name="stop-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stop</h4>
<pre>public static&nbsp;boolean&nbsp;stop(boolean&nbsp;cancel)</pre>
<div class="block">Stops default grid. This method is identical to <code>G.stop(null, cancel)</code> apply.
Note that method does not wait for all tasks to be completed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cancel</code> - If <code>true</code> then all jobs currently executing on
default grid will be cancelled by calling <a href="../../../org/apache/ignite/compute/ComputeJob.html#cancel--"><code>ComputeJob.cancel()</code></a>
method. Note that just like with <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#interrupt--" title="class or interface in java.lang"><code>Thread.interrupt()</code></a>, it is
up to the actual job to exit from execution</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if default grid instance was indeed stopped,
<code>false</code> otherwise (if it was not started).</dd>
</dl>
</li>
</ul>
<a name="stop-java.lang.String-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stop</h4>
<pre>public static&nbsp;boolean&nbsp;stop(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
boolean&nbsp;cancel)</pre>
<div class="block">Stops named Ignite instance. If <code>cancel</code> flag is set to <code>true</code> then
all jobs currently executing on local node will be interrupted. If
Ignite instance name is <code>null</code>, then default no-name Ignite instance will be stopped.
If wait parameter is set to <code>true</code> then Ignite instance will wait for all
tasks to be finished.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - Ignite instance name. If <code>null</code>, then default no-name Ignite instance will
be stopped.</dd>
<dd><code>cancel</code> - If <code>true</code> then all jobs currently will be cancelled
by calling <a href="../../../org/apache/ignite/compute/ComputeJob.html#cancel--"><code>ComputeJob.cancel()</code></a> method. Note that just like with
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#interrupt--" title="class or interface in java.lang"><code>Thread.interrupt()</code></a>, it is up to the actual job to exit from
execution. If <code>false</code>, then jobs currently running will not be
canceled. In either case, grid node will wait for completion of all
jobs running on it before stopping.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if named Ignite instance was indeed found and stopped,
<code>false</code> otherwise (the instance with given <code>name</code> was
not found).</dd>
</dl>
</li>
</ul>
<a name="stopAll-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stopAll</h4>
<pre>public static&nbsp;void&nbsp;stopAll(boolean&nbsp;cancel)</pre>
<div class="block">Stops <b>all</b> started grids in current JVM. If <code>cancel</code> flag is set to <code>true</code> then
all jobs currently executing on local node will be interrupted.
If wait parameter is set to <code>true</code> then grid will wait for all
tasks to be finished.
<p>
<b>Note:</b> it is usually safer and more appropriate to stop grid instances individually
instead of blanket operation. In most cases, the party that started the grid instance
should be responsible for stopping it.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cancel</code> - If <code>true</code> then all jobs currently executing on
all grids will be cancelled by calling <a href="../../../org/apache/ignite/compute/ComputeJob.html#cancel--"><code>ComputeJob.cancel()</code></a>
method. Note that just like with <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#interrupt--" title="class or interface in java.lang"><code>Thread.interrupt()</code></a>, it is
up to the actual job to exit from execution</dd>
</dl>
</li>
</ul>
<a name="restart-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>restart</h4>
<pre>public static&nbsp;void&nbsp;restart(boolean&nbsp;cancel)</pre>
<div class="block">Restarts <b>all</b> started grids. If <code>cancel</code> flag is set to <code>true</code> then
all jobs currently executing on the local node will be interrupted.
If <code>wait</code> parameter is set to <code>true</code> then grid will wait for all
tasks to be finished.
<p>
<b>Note:</b> it is usually safer and more appropriate to stop grid instances individually
instead of blanket operation. In most cases, the party that started the grid instance
should be responsible for stopping it.
<p>
Note also that restarting functionality only works with the tools that specifically
support Ignite's protocol for restarting. Currently only standard <tt>ignite.{sh|bat}</tt>
scripts support restarting of JVM Ignite's process.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cancel</code> - If <code>true</code> then all jobs currently executing on
all grids will be cancelled by calling <a href="../../../org/apache/ignite/compute/ComputeJob.html#cancel--"><code>ComputeJob.cancel()</code></a>
method. Note that just like with <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#interrupt--" title="class or interface in java.lang"><code>Thread.interrupt()</code></a>, it is
up to the actual job to exit from execution.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../org/apache/ignite/Ignition.html#RESTART_EXIT_CODE"><code>RESTART_EXIT_CODE</code></a></dd>
</dl>
</li>
</ul>
<a name="kill-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>kill</h4>
<pre>public static&nbsp;void&nbsp;kill(boolean&nbsp;cancel)</pre>
<div class="block">Stops <b>all</b> started grids. If <code>cancel</code> flag is set to <code>true</code> then
all jobs currently executing on the local node will be interrupted.
If <code>wait</code> parameter is set to <code>true</code> then grid will wait for all
tasks to be finished.
<p>
<b>Note:</b> it is usually safer and more appropriate to stop grid instances individually
instead of blanket operation. In most cases, the party that started the grid instance
should be responsible for stopping it.
<p>
Note that upon completion of this method, the JVM with forcefully exist with
exit code <a href="../../../org/apache/ignite/Ignition.html#KILL_EXIT_CODE"><code>KILL_EXIT_CODE</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cancel</code> - If <code>true</code> then all jobs currently executing on
all grids will be cancelled by calling <a href="../../../org/apache/ignite/compute/ComputeJob.html#cancel--"><code>ComputeJob.cancel()</code></a>
method. Note that just like with <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#interrupt--" title="class or interface in java.lang"><code>Thread.interrupt()</code></a>, it is
up to the actual job to exit from execution.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../org/apache/ignite/Ignition.html#KILL_EXIT_CODE"><code>KILL_EXIT_CODE</code></a></dd>
</dl>
</li>
</ul>
<a name="start--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>public static&nbsp;<a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a>&nbsp;start()
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Starts grid with default configuration. By default this method will
use grid configuration defined in <code>IGNITE_HOME/config/default-config.xml</code>
configuration file. If such file is not found, then all system defaults will be used.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Started grid.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If default grid could not be started. This exception will be thrown
also if default grid has already been started.</dd>
</dl>
</li>
</ul>
<a name="start-org.apache.ignite.configuration.IgniteConfiguration-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>public static&nbsp;<a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a>&nbsp;start(<a href="../../../org/apache/ignite/configuration/IgniteConfiguration.html" title="class in org.apache.ignite.configuration">IgniteConfiguration</a>&nbsp;cfg)
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Starts grid with given configuration. Note that this method will throw an exception if grid with the name
provided in given configuration is already started.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cfg</code> - Grid configuration. This cannot be <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Started grid.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If grid could not be started. This exception will be thrown
also if named grid has already been started.</dd>
</dl>
</li>
</ul>
<a name="start-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>public static&nbsp;<a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a>&nbsp;start(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;springCfgPath)
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Starts all grids specified within given Spring XML configuration file. If grid with given name
is already started, then exception is thrown. In this case all instances that may
have been started so far will be stopped too.
<p>
Usually Spring XML configuration file will contain only one Grid definition. Note that
Grid configuration bean(s) is retrieved form configuration file by type, so the name of
the Grid configuration bean is ignored.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>springCfgPath</code> - Spring XML configuration file path or URL.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Started grid. If Spring configuration contains multiple grid instances,
then the 1st found instance is returned.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If grid could not be started or configuration
read. This exception will be thrown also if grid with given name has already
been started or Spring XML configuration file is invalid.</dd>
</dl>
</li>
</ul>
<a name="start-java.net.URL-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>public static&nbsp;<a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a>&nbsp;start(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;springCfgUrl)
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Starts all grids specified within given Spring XML configuration file URL. If grid with given name
is already started, then exception is thrown. In this case all instances that may
have been started so far will be stopped too.
<p>
Usually Spring XML configuration file will contain only one Grid definition. Note that
Grid configuration bean(s) is retrieved form configuration file by type, so the name of
the Grid configuration bean is ignored.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>springCfgUrl</code> - Spring XML configuration file URL. This cannot be <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Started grid. If Spring configuration contains multiple grid instances,
then the 1st found instance is returned.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If grid could not be started or configuration
read. This exception will be thrown also if grid with given name has already
been started or Spring XML configuration file is invalid.</dd>
</dl>
</li>
</ul>
<a name="start-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>public static&nbsp;<a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a>&nbsp;start(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;springCfgStream)
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Starts all grids specified within given Spring XML configuration input stream. If grid with given name
is already started, then exception is thrown. In this case all instances that may
have been started so far will be stopped too.
<p>
Usually Spring XML configuration input stream will contain only one Grid definition. Note that
Grid configuration bean(s) is retrieved form configuration input stream by type, so the name of
the Grid configuration bean is ignored.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>springCfgStream</code> - Input stream containing Spring XML configuration. This cannot be <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Started grid. If Spring configuration contains multiple grid instances,
then the 1st found instance is returned.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If grid could not be started or configuration
read. This exception will be thrown also if grid with given name has already
been started or Spring XML configuration file is invalid.</dd>
</dl>
</li>
</ul>
<a name="getOrStart-org.apache.ignite.configuration.IgniteConfiguration-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOrStart</h4>
<pre>public static&nbsp;<a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a>&nbsp;getOrStart(<a href="../../../org/apache/ignite/configuration/IgniteConfiguration.html" title="class in org.apache.ignite.configuration">IgniteConfiguration</a>&nbsp;cfg)
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Gets or starts new grid instance if it hasn't been started yet.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cfg</code> - Grid configuration. This cannot be <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Grid instance.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If grid could not be started.</dd>
</dl>
</li>
</ul>
<a name="loadSpringBean-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>loadSpringBean</h4>
<pre>public static&nbsp;<span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;T&nbsp;loadSpringBean(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;springXmlPath,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;beanName)
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Loads Spring bean by its name from given Spring XML configuration file. If bean
with such name doesn't exist, exception is thrown.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>springXmlPath</code> - Spring XML configuration file path (cannot be <code>null</code>).</dd>
<dd><code>beanName</code> - Bean name (cannot be <code>null</code>).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Loaded bean instance.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If bean with provided name was not found or in case any other error.</dd>
</dl>
</li>
</ul>
<a name="loadSpringBean-java.net.URL-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>loadSpringBean</h4>
<pre>public static&nbsp;<span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;T&nbsp;loadSpringBean(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;springXmlUrl,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;beanName)
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Loads Spring bean by its name from given Spring XML configuration file. If bean
with such name doesn't exist, exception is thrown.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>springXmlUrl</code> - Spring XML configuration file URL (cannot be <code>null</code>).</dd>
<dd><code>beanName</code> - Bean name (cannot be <code>null</code>).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Loaded bean instance.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If bean with provided name was not found or in case any other error.</dd>
</dl>
</li>
</ul>
<a name="loadSpringBean-java.io.InputStream-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>loadSpringBean</h4>
<pre>public static&nbsp;<span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;T&nbsp;loadSpringBean(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;springXmlStream,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;beanName)
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Loads Spring bean by its name from given Spring XML configuration file. If bean
with such name doesn't exist, exception is thrown.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>springXmlStream</code> - Input stream containing Spring XML configuration (cannot be <code>null</code>).</dd>
<dd><code>beanName</code> - Bean name (cannot be <code>null</code>).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Loaded bean instance.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - If bean with provided name was not found or in case any other error.</dd>
</dl>
</li>
</ul>
<a name="ignite--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ignite</h4>
<pre>public static&nbsp;<a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a>&nbsp;ignite()
throws <a href="../../../org/apache/ignite/IgniteIllegalStateException.html" title="class in org.apache.ignite">IgniteIllegalStateException</a></pre>
<div class="block">Gets an instance of default no-name grid. Note that
caller of this method should not assume that it will return the same
instance every time.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>An instance of default no-name grid. This method never returns
<code>null</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteIllegalStateException.html" title="class in org.apache.ignite">IgniteIllegalStateException</a></code> - Thrown if default grid was not properly
initialized or grid instance was stopped or was not started.</dd>
</dl>
</li>
</ul>
<a name="allGrids--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allGrids</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><span class='angle_bracket'>&lt;</span><a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a><span class='angle_bracket'>&gt;</span>&nbsp;allGrids()</pre>
<div class="block">Gets a list of all grids started so far.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>List of all grids started so far.</dd>
</dl>
</li>
</ul>
<a name="ignite-java.util.UUID-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ignite</h4>
<pre>public static&nbsp;<a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a>&nbsp;ignite(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>&nbsp;locNodeId)
throws <a href="../../../org/apache/ignite/IgniteIllegalStateException.html" title="class in org.apache.ignite">IgniteIllegalStateException</a></pre>
<div class="block">Gets a grid instance for given local node ID. Note that grid instance and local node have
one-to-one relationship where node has ID and instance has name of the grid to which
both grid instance and its node belong. Note also that caller of this method
should not assume that it will return the same instance every time.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>locNodeId</code> - ID of local node the requested grid instance is managing.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>An instance of named grid. This method never returns
<code>null</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteIllegalStateException.html" title="class in org.apache.ignite">IgniteIllegalStateException</a></code> - Thrown if grid was not properly
initialized or grid instance was stopped or was not started.</dd>
</dl>
</li>
</ul>
<a name="ignite-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ignite</h4>
<pre>public static&nbsp;<a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a>&nbsp;ignite(@Nullable
@Nullable <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)
throws <a href="../../../org/apache/ignite/IgniteIllegalStateException.html" title="class in org.apache.ignite">IgniteIllegalStateException</a></pre>
<div class="block">Gets a named Ignite instance. If Ignite instance name is <code>null</code> or empty string,
then default no-name Ignite instance will be returned. Note that caller of this method
should not assume that it will return the same instance every time.
<p>
The name allows having multiple Ignite instances with different names within the same Java VM.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - Ignite instance name. If <code>null</code>, then a default no-name
Ignite instance will be returned.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A named Ignite instance. This method never returns <code>null</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteIllegalStateException.html" title="class in org.apache.ignite">IgniteIllegalStateException</a></code> - Thrown if default Ignite instance was not properly
initialized or Ignite instance was stopped or was not started.</dd>
</dl>
</li>
</ul>
<a name="localIgnite--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>localIgnite</h4>
<pre>public static&nbsp;<a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite">Ignite</a>&nbsp;localIgnite()
throws <a href="../../../org/apache/ignite/IgniteIllegalStateException.html" title="class in org.apache.ignite">IgniteIllegalStateException</a>,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">This method is used to address a local <a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite"><code>Ignite</code></a> instance, principally from closure.
<p>
According to contract this method has to be called only under <a href="../../../org/apache/ignite/thread/IgniteThread.html" title="class in org.apache.ignite.thread"><code>IgniteThread</code></a>.
An <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> will be thrown otherwise.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A current <a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite"><code>Ignite</code></a> instance to address from closure.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteIllegalStateException.html" title="class in org.apache.ignite">IgniteIllegalStateException</a></code> - Thrown if grid was not properly
initialized or grid instance was stopped or was not started</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - Thrown if current thread is not an <a href="../../../org/apache/ignite/thread/IgniteThread.html" title="class in org.apache.ignite.thread"><code>IgniteThread</code></a>.</dd>
</dl>
</li>
</ul>
<a name="addListener-org.apache.ignite.IgnitionListener-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addListener</h4>
<pre>public static&nbsp;void&nbsp;addListener(<a href="../../../org/apache/ignite/IgnitionListener.html" title="interface in org.apache.ignite">IgnitionListener</a>&nbsp;lsnr)</pre>
<div class="block">Adds a lsnr for grid life cycle events.
<p>
Note that unlike other listeners in Ignite this listener will be
notified from the same thread that triggers the state change. Because of
that it is the responsibility of the user to make sure that listener logic
is light-weight and properly handles (catches) any runtime exceptions, if any
are expected.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lsnr</code> - Listener for grid life cycle events. If this listener was already added
this method is no-op.</dd>
</dl>
</li>
</ul>
<a name="removeListener-org.apache.ignite.IgnitionListener-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeListener</h4>
<pre>public static&nbsp;boolean&nbsp;removeListener(<a href="../../../org/apache/ignite/IgnitionListener.html" title="interface in org.apache.ignite">IgnitionListener</a>&nbsp;lsnr)</pre>
<div class="block">Removes lsnr added by <a href="../../../org/apache/ignite/Ignition.html#addListener-org.apache.ignite.IgnitionListener-"><code>addListener(IgnitionListener)</code></a> method.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lsnr</code> - Listener to remove.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if lsnr was added before, <code>false</code> otherwise.</dd>
</dl>
</li>
</ul>
<a name="startClient-org.apache.ignite.configuration.ClientConfiguration-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>startClient</h4>
<pre>public static&nbsp;<a href="../../../org/apache/ignite/client/IgniteClient.html" title="interface in org.apache.ignite.client">IgniteClient</a>&nbsp;startClient(<a href="../../../org/apache/ignite/configuration/ClientConfiguration.html" title="class in org.apache.ignite.configuration">ClientConfiguration</a>&nbsp;cfg)
throws <a href="../../../org/apache/ignite/client/ClientException.html" title="class in org.apache.ignite.client">ClientException</a></pre>
<div class="block">Initializes new instance of <a href="../../../org/apache/ignite/client/IgniteClient.html" title="interface in org.apache.ignite.client"><code>IgniteClient</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cfg</code> - Thin client configuration.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Client with successfully opened thin client connection.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/client/ClientException.html" title="class in org.apache.ignite.client">ClientException</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Ignition.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/ignite/IgniteTransactions.html" title="interface in org.apache.ignite"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../org/apache/ignite/IgnitionListener.html" title="interface in org.apache.ignite"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/ignite/Ignition.html" target="_top">Frames</a></li>
<li><a href="Ignition.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><table width="100%" border="0" cellspacing=0 cellpadding=0 style="padding: 5px"> <tr> <td> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <a target=_blank href="https://ignite.apache.org"><nobr>2021 Copyright &#169; Apache Software Foundation</nobr></a> </td> </tr> </tbody> </table> </td> <td width="100%" align="right" valign="center"> <a href="https://twitter.com/ApacheIgnite" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @ApacheIgnite</a> </td> </tr> <tr> <td colspan="2" valign="top" align="left"> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <b>Ignite Database and Caching Platform</b> </td> <td>:&nbsp;&nbsp; ver. <strong>2.10.0</strong> </td> </tr> <tr style="padding: 0; margin: 0"> <td> <b>Release Date</b> </td> <td>:&nbsp;&nbsp; March 10 2021 </td> </tr> </tbody> </table> </td> </tr> </table></small></p>
</body>
</html>