public class Grid extends Object
Modifier and Type | Method and Description |
---|---|
Cluster |
cluster()
Returns the grid's cluster management and node lifecycle service.
|
static Grid |
getInstance()
Retrieves the named grid instance, as specified in the default configuration file.
|
static Grid |
getInstance(String configFile,
Properties properties)
Retrieves the grid instance, as defined in the given configuration file.
|
static Grid |
getInstance(String configFile,
String propertiesFile)
Retrieves the grid instance, as defined in the given configuration file.
|
void |
goOnline()
Makes this node a full participant in the cluster (rather than just an observer).
|
Messenger |
messenger()
Returns the grid's messaging service.
|
Store |
store()
Returns the grid's distributed data-store service.
|
public static Grid getInstance() throws InterruptedException
InterruptedException
public static Grid getInstance(String configFile, String propertiesFile) throws InterruptedException
configFile
- The name of the configuration file containing the grid definition.propertiesFile
- The name of the properties file containing the grid's properties. You may, of course use Spring's <context:property-placeholder location="classpath:com/foo/bar.properties"/>
but this parameter is helpful when you want to use the same xml configuration with different properties for different
instances.InterruptedException
public static Grid getInstance(String configFile, Properties properties) throws InterruptedException
configFile
- The name of the configuration file containing the grid definition.properties
- A Properties
object containing the grid's properties to be injected into placeholders
in the configuration file.
This parameter is helpful when you want to use the same xml configuration with different properties for different
instances.InterruptedException
public Store store()
public Messenger messenger()
public Cluster cluster()
public void goOnline() throws InterruptedException
InterruptedException