public class IgniteSpring extends Object
@SpringApplicationContextResource
annotation.
You can also instantiate grid directly from Spring without using Ignite
.
For more information refer to IgniteSpringBean
documentation.
Constructor and Description |
---|
IgniteSpring() |
Modifier and Type | Method and Description |
---|---|
static Ignite |
start(@Nullable org.springframework.context.ApplicationContext springCtx)
Starts grid with default configuration.
|
static Ignite |
start(IgniteConfiguration cfg,
@Nullable org.springframework.context.ApplicationContext springCtx)
Starts grid with given configuration.
|
static Ignite |
start(String springCfgPath,
@Nullable org.springframework.context.ApplicationContext springCtx)
Starts all grids specified within given Spring XML configuration file.
|
static Ignite |
start(URL springCfgUrl,
@Nullable org.springframework.context.ApplicationContext springCtx)
Starts all grids specified within given Spring XML configuration file URL.
|
public static Ignite start(@Nullable @Nullable org.springframework.context.ApplicationContext springCtx) throws IgniteCheckedException
IGNITE_HOME/config/default-config.xml
configuration file. If such file is not found, then all system defaults will be used.springCtx
- Optional Spring application context, possibly null
.
Spring bean definitions for bean injection are taken from this context.
If provided, this context can be injected into grid tasks and grid jobs using
@SpringApplicationContextResource
annotation.IgniteCheckedException
- If default grid could not be started. This exception will be thrown
also if default grid has already been started.public static Ignite start(IgniteConfiguration cfg, @Nullable @Nullable org.springframework.context.ApplicationContext springCtx) throws IgniteCheckedException
cfg
- Grid configuration. This cannot be null
.springCtx
- Optional Spring application context, possibly null
.
Spring bean definitions for bean injection are taken from this context.
If provided, this context can be injected into grid tasks and grid jobs using
@SpringApplicationContextResource
annotation.IgniteCheckedException
- If grid could not be started. This exception will be thrown
also if named grid has already been started.public static Ignite start(String springCfgPath, @Nullable @Nullable org.springframework.context.ApplicationContext springCtx) throws IgniteCheckedException
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.
springCfgPath
- Spring XML configuration file path or URL. This cannot be null
.springCtx
- Optional Spring application context, possibly null
.
Spring bean definitions for bean injection are taken from this context.
If provided, this context can be injected into grid tasks and grid jobs using
@SpringApplicationContextResource
annotation.IgniteCheckedException
- 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.public static Ignite start(URL springCfgUrl, @Nullable @Nullable org.springframework.context.ApplicationContext springCtx) throws IgniteCheckedException
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.
springCfgUrl
- Spring XML configuration file URL. This cannot be null
.springCtx
- Optional Spring application context, possibly null
.
Spring bean definitions for bean injection are taken from this context.
If provided, this context can be injected into grid tasks and grid jobs using
@GridSpringApplicationContextResource
annotation.IgniteCheckedException
- 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.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023