Click on Javadoc link to open Javadoc documentation.
Package
org.gridgain.grid.spi.discovery.coherence ![]()
Description
GridCoherenceDiscoverySpi ![]()
![]()
| Libraries Coherence is not shipped with GridGain. If you don't have Coherence, you need to download it separately. See http://www.oracle.com/tangosol/index.html |
| Multiple Instances In VM When using Coherence SPIs (communication or discovery) you cannot start multiple GridGain instances in the same VM due to limitations of Coherence. GridGain runtime will detect this situation and prevent GridGain from starting in such case. See GridSpiMultipleInstancesSupport |
Configuration
The following configuration parameters can be used to configure GridMulticastDiscoverySpi:
| Setter Method | Description | Optional | Default |
|---|---|---|---|
| setCacheName(String) |
Coherence cache name. | Yes | gridgain.discovery.cache (specified by GridCoherenceDiscoverySpi.DFLT_GRIDGAIN_CACHE |
| setMetricsFrequency(long) |
Grid node metrics update frequency. | Yes | 3000 (specified by GridCoherenceDiscoverySpi.DFLT_METRICS_FREQ |
Examples
GridCoherenceDiscoverySpi ![]()
GridCoherenceDiscoverySpi spi = new GridCoherenceDiscoverySpi(); GridConfigurationAdapter cfg = new GridConfigurationAdapter(); // Override default discovery SPI. cfg.setDiscoverySpi(spi); // Start grid. GridFactory.start(cfg);
or from Spring configuration file
<bean id="grid.custom.cfg" class="org.gridgain.grid.GridConfigurationAdapter" singleton="true"> ... <property name="discoverySpi"> <bean class="org.gridgain.grid.spi.discovery.coherence.GridCoherenceDiscoverySpi"/> </property> ... </bean>

For more information about using Spring framework for configuration click here.
