public interface TopologyValidator extends Serializable
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.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;
}
}
| Modifier and Type | Method and Description |
|---|---|
boolean |
validate(Collection<ClusterNode> nodes)
Validates topology.
|
boolean validate(Collection<ClusterNode> nodes)
nodes - Collection of nodes.true in case topology is valid for specific cache, otherwise false
Follow @ApacheIgnite
Ignite Fabric : ver. 1.4.0 Release Date : September 24 2015