Dashboard > GridGain User Guide > Table Of Contents > Developers Guide > Topology SPI > GridBasicTopologySpi
GridBasicTopologySpi
Added by morpheus, last edited by morpheus on Jul 30, 2007  (view change)
Labels: 
(None)


Click on Javadoc link to open Javadoc documentation.

Package

org.gridgain.grid.spi.toplogy.basic Javadoc

Description

GridBasicTopologySpi Javadoc provides basic topology SPI implementation. Depending on configuration, it always returns either all available remote grid nodes, remote and local nodes, or only a local node.

Configuration

The following configuration parameters can be used to configure GridBasicTopologySpi Javadoc

Setter Method Description Optional Default
setLocalNode(boolean) Javadoc Controls whether topology should include local node or not. Yes true
setRemoteNodes(boolean) Javadoc Controls whether topology should include remote nodes or not. Yes true

Examples

As any GridGain SPI, GridBasicTopologySpi Javadoc can be configured either directly from code or from Spring configuration file. Here is an example of GridBasicTopologySpi Javadoc configuration from code:

GridBasicTopologySpi topSpi = new GridBasicTopologySpi();

// Exclude local node from topology.
topSpi.setLocalNode(false);

GridConfigurationAdapter cfg = new GridConfigurationAdapter();

// Override default topology SPI.
cfg.setTopologySpi(topSpi);

// Start grid.
GridFactory.start(cfg);

or from Spring configuration file

<bean id="grid.custom.cfg" class="org.gridgain.grid.GridConfigurationAdapter" singleton="true">
        ...
        <property name="topologySpi">
            <bean class="org.gridgain.grid.spi.topology.basic.GridBasicTopologySpi">
                <property name="localNode" value="false"/>
            </bean>
        </property>
        ...
</bean>


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

Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.10 Build:#528 Nov 29, 2006) - Bug/feature request - Contact Administrators