|
GridGain 2.1.0
Java API Specification |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Apache20LicenseCompatible public interface GridNodeFilter
Instances of classes that implement this interface are used to filter grid nodes.
These instances are used to filter nodes in method Grid.getNodes(GridNodeFilter).
They are also used by GridNodeFilterTopologySpi
to provide task topology based on user-defined node filters.
GridGain also comes with GridJexlNodeFilter implementation which allows you
to conveniently filter nodes based on Apache JEXL expression language. For more
information refer to Apache JEXL
documentation.
Together with GridNodeFilterTopologySpi
GridJexlNodeFilter allows for a fairly simple way to provide complex SLA-based
task topology specifications. For example, expression below shows how the SPI can be
configured with GridJexlNodeFilter to include all Windows XP nodes
with more than one processor or core and that are not loaded over 50%
<bean id="grid.custom.cfg" class="org.gridgain.grid.GridConfigurationAdapter" singleton="true">
...
<property name="topologySpi">
<bean class="org.gridgain.grid.spi.topology.nodefilter.GridNodeFilterTopologySpi">
<property name="filter">
<bean class="org.gridgain.grid.GridJexlNodeFilter">
<property name="expression"
value="node.metrics.availableProcessors > 1 && node.metrics.averageCpuLoad < 0.5 && node.attributes['os.name'] == 'Windows XP'"/>
</bean>
</property>
</bean>
</property>
...
</bean>
Documentation
Email Support
Online Forums
Issue Tracking
Author: 2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.1.0

| Method Summary | |
|---|---|
boolean |
accept(GridNode node)
Tests if a specified grid node should be accepted. |
| Method Detail |
|---|
boolean accept(GridNode node)
node - Node to check.
|
GridGain 2.1.0
Java API Specification |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
GridGain - Grid Computing Made Simple, ver. 2.1.0.19122008
2005-2008 Copyright © GridGain Systems. All Rights Reserved. |
|
|