org.apache.ignite.configuration

## Interface TopologyValidator

All Superinterfaces:
  Serializable

    public interface TopologyValidator
    extends Serializable

Topology validator checks whether the new topology is valid for specific cache at each topology change.

Topology is always valid in case no topology validator used.

In case topology is valid for specific cache all operations on this cache are allowed.

In case topology is not valid for specific cache all update operations on this cache are restricted:

- `CacheException` will be thrown at update operations (put, remove, etc) attempt.
- `IgniteException` will be thrown at transaction commit attempt.

Usage example

Following validator allows to put data only in case topology contains exactly 2 nodes:

    new TopologyValidator() {
        public boolean validate(Collection<ClusterNode> nodes) {
           return nodes.size() == 2;
        }
     }

### Method Summary

Methods
`boolean` `validate(Collection<ClusterNode> nodes)` Validates topology.

### Method Detail

#### validate

    boolean validate(Collection<ClusterNode> nodes)

Validates topology.

Parameters:
  `nodes` - Collection of nodes.
Returns:
  `true` in case topology is valid for specific cache, otherwise `false`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.4.0
Release Date | : September 24 2015