public class ConnectionManager extends Object implements MembershipListener
Constructor and Description |
---|
ConnectionManager(HazelcastClient client,
ClientConfig config,
LifecycleServiceClientImpl lifecycleService) |
Modifier and Type | Method and Description |
---|---|
void |
destroyConnection(Connection connection) |
Connection |
getConnection() |
Connection |
getInitConnection() |
protected Connection |
getNextConnection() |
Connection |
lookForLiveConnection() |
void |
memberAdded(MembershipEvent membershipEvent)
Invoked when a new member is added to the cluster.
|
void |
memberRemoved(MembershipEvent membershipEvent)
Invoked when an existing member leaves the cluster.
|
void |
setBinder(ClientBinder binder) |
boolean |
shouldExecuteOnDisconnect(Connection connection) |
void |
shutdown() |
void |
updateMembers() |
public ConnectionManager(HazelcastClient client, ClientConfig config, LifecycleServiceClientImpl lifecycleService)
public Connection getInitConnection() throws IOException
IOException
public Connection lookForLiveConnection() throws IOException
IOException
public Connection getConnection() throws IOException
IOException
public void destroyConnection(Connection connection)
protected Connection getNextConnection()
public void memberAdded(MembershipEvent membershipEvent)
MembershipListener
memberAdded
in interface MembershipListener
membershipEvent
- membership eventpublic void memberRemoved(MembershipEvent membershipEvent)
MembershipListener
memberRemoved
in interface MembershipListener
membershipEvent
- membership eventpublic void updateMembers()
public boolean shouldExecuteOnDisconnect(Connection connection)
public void setBinder(ClientBinder binder)
public void shutdown()
Copyright © 2013 Hazelcast, Inc.. All rights reserved.