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

HazelcastInstance JavaDoc - TLC #14439

Closed
jerrinot opened this issue Jan 30, 2019 · 4 comments

Comments

Projects
None yet
5 participants
@jerrinot
Copy link
Contributor

commented Jan 30, 2019

this is what it says right now:

/**
 * Hazelcast instance. Each Hazelcast instance is a member (node) in a cluster.
 * Multiple Hazelcast instances can be created on a JVM.
 * Each Hazelcast instance has its own socket, threads.
 *
 * @see Hazelcast#newHazelcastInstance(Config config)
 */
public interface HazelcastInstance {

It's very minimal. and it's not even true. not every instance is a member. The contract should also describe instance lifecycle and that we expect a user to explicitly close it.

@Serdaro

This comment has been minimized.

Copy link
Member

commented Feb 4, 2019

Enhanced a bit as follows:

/**
 * Hazelcast instance. Each instance is a member and/or client in a Hazelcast cluster. When
 * you want to use Hazelcast's distributed data structures, you must first create an instance.
 * Multiple Hazelcast instances can be created on a single JVM.
 * 
 * Instances should be shut down explicitly. When it is a member, use {@link com.hazelcast.core.LifecycleService#shutdown()}.
 * When it is a client, you need to shut it down 
 * using {@link com.hazelcast.client.HazelcastClient#shutdown(HazelcastInstance instance)}
 * since it has started with non-daemon threads. Otherwise, it will continue to run and 
 * even connect to another live member if the one it was connected fails.
 *
 * Each Hazelcast instance has its own socket and threads.
 *
 * @see Hazelcast#newHazelcastInstance(Config config)
 */

Please let me know for any other improvement points.

@sancar

This comment has been minimized.

Copy link
Member

commented Feb 4, 2019

@Serdaro Explicit Shutdown is necessary for both member and client.

@Serdaro

This comment has been minimized.

Copy link
Member

commented Feb 13, 2019

@sancar , Updated the comment above.

@jerrinot

This comment has been minimized.

Copy link
Contributor Author

commented Feb 13, 2019

@Serdaro: it's looking much better. it's still missing one very big point: it's the entry point to give you Hazelcast data structures. this is The Place to start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.