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
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024