kgusakov commented on code in PR #4675:
URL: https://github.com/apache/ignite-3/pull/4675#discussion_r1837064229


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/configuration/DistributionZonesHighAvailabilityConfiguration.java:
##########
@@ -35,22 +36,28 @@ public class DistributionZonesHighAvailabilityConfiguration 
{
     static final String PARTITION_DISTRIBUTION_RESET_TIMEOUT = 
"partitionDistributionResetTimeout";
 
     /** Default value for the {@link #PARTITION_DISTRIBUTION_RESET_TIMEOUT}. */
-    private static final long 
PARTITION_DISTRIBUTION_RESET_TIMEOUT_DEFAULT_VALUE = 0;
+    private static final int 
PARTITION_DISTRIBUTION_RESET_TIMEOUT_DEFAULT_VALUE = 0;
 
     private final SystemDistributedConfiguration systemDistributedConfig;
 
     /** Determines partition group reset timeout after a partition group 
majority loss. */
-    private volatile long partitionDistributionResetTimeout;
+    private volatile int partitionDistributionResetTimeout;
+
+    /** Listener, which receives (timeout, revision) on every configuration 
update. */
+    private final BiConsumer<Integer, Long> partitionDistributionResetListener;
 
     /** Constructor. */
-    public 
DistributionZonesHighAvailabilityConfiguration(SystemDistributedConfiguration 
systemDistributedConfig) {
+    public DistributionZonesHighAvailabilityConfiguration(
+            SystemDistributedConfiguration systemDistributedConfig,
+            BiConsumer<Integer, Long> partitionDistributionResetListener) {

Review Comment:
   I would keep it this way, until the time when we will have (maybe) many 
listeners for this event and extend API by the listeners mutations.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to