Support register user defined CloudEventHandler when participant connect. (#2121)
authorxyuanlu <xyuanlu@gmail.com>
Thu, 2 Jun 2022 18:46:33 +0000 (11:46 -0700)
committerGitHub <noreply@github.com>
Thu, 2 Jun 2022 18:46:33 +0000 (11:46 -0700)
commitae0f50d719c645ed3202167caa7c807d355e01c7
tree429861c810c42c1cf3fccfdd3f0438757beed047
parent6524a34a3d79b41d80cc1efa09b6a16d0f3ec31e
 Support register user defined CloudEventHandler when participant connect. (#2121)

This change will load user defined CloudEventHandler dynamically when ZkHelixManager.connect(). User need to implement a EventController and pass the class name when initiating ZkHelixManager.
helix-core/src/main/java/org/apache/helix/HelixCloudProperty.java
helix-core/src/main/java/org/apache/helix/cloud/event/AbstractEventHandler.java [new file with mode: 0644]
helix-core/src/main/java/org/apache/helix/cloud/event/CloudEventHandler.java
helix-core/src/main/java/org/apache/helix/cloud/event/CloudEventHandlerFactory.java
helix-core/src/main/java/org/apache/helix/cloud/event/helix/CloudEventCallbackProperty.java
helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
helix-core/src/test/java/org/apache/helix/cloud/event/HelixTestCloudEventHandler.java [new file with mode: 0644]
helix-core/src/test/java/org/apache/helix/cloud/event/MockCloudEventAwareHelixManager.java
helix-core/src/test/java/org/apache/helix/cloud/event/TestCloudEventCallbackProperty.java