There is no explicit read-only state on cache level. But cache can be in a
read-only state according to Partition Loss Policy [1]. I mean if there are
loss partitions and READ_ONLY SAFE policy is set in this case the cache
could be in read-only mode.

To check are there loss parts: !cache.lostPartitions().isEmpty()
Which policy is set you can check from the cache conguration.

[1]
https://ignite.apache.org/docs/latest/configuring-caches/partition-loss-policy

пт, 16 апр. 2021 г. в 20:55, facundo.maldonado <maldonadofacu...@gmail.com>:

> Fair enough, with cluster().nodes() I get the online nodes and matching
> them
> with cluster().currentBaselineTopology() should give me those that are
> offline (from baseline).
>
> ignite.cluster().state() gives us the state of the cluster. The cluster
> could be ACTIVE but the cache is in ReadOnlyState.
>
> The only way to find out that is by the exception it throws when I need to
> write something?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Reply via email to