Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

health check #151

Open
obbyK opened this issue Mar 14, 2021 · 1 comment
Open

health check #151

obbyK opened this issue Mar 14, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@obbyK
Copy link

obbyK commented Mar 14, 2021

can health check be added in relation to microprofile-health. Or how can one check if the client is connected to the cluster?

@pivovarit pivovarit added the enhancement New feature or request label Mar 16, 2021
@pivovarit pivovarit self-assigned this Mar 16, 2021
@pivovarit
Copy link
Contributor

pivovarit commented Mar 16, 2021

Sure, it's a good idea. We'll add it. For now, you can use LifecycleListener to listen for relevant events:

 this.hazelcastClient.getLifecycleService().addLifecycleListener(event -> {
            state = event.getState();
            if (event.getState() == LifecycleEvent.LifecycleState.CLIENT_CONNECTED) {
                connected = true;
            }

            if (event.getState() == LifecycleEvent.LifecycleState.CLIENT_DISCONNECTED) {
                connected = false;
            }
        });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants