public interface TopologyValidator extends Serializable
If topology validator is not configured, then the cluster topology is always considered to be valid.
Whenever the validate(Collection)
method returns true
, then the topology is considered valid
for a certain cache and all operations on this cache will be allowed to proceed. Otherwise, all update operations
on the cache are restricted with the following exceptions:
CacheException
will be thrown for all update operations (put, remove, etc) attempt.IgniteException
will be thrown for the transaction commit attempt.false
and declaring the topology not valid, the topology validator can return
to normal state whenever the next topology change happens.
new TopologyValidator() { public boolean validate(Collectionnodes) { return nodes.size() == 2; } }
CacheConfiguration.setTopologyValidator(TopologyValidator)
method.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 Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019