public abstract class ClusterListenerSupport extends Object implements ConnectionListener, ConnectionHeartbeatListener, ClientClusterService
Modifier and Type | Field and Description |
---|---|
protected HazelcastClientInstanceImpl |
client |
Constructor and Description |
---|
ClusterListenerSupport(HazelcastClientInstanceImpl client,
Collection<AddressProvider> addressProviders) |
Modifier and Type | Method and Description |
---|---|
void |
connectionAdded(Connection connection) |
void |
connectionRemoved(Connection connection) |
void |
connectToCluster() |
Address |
getOwnerConnectionAddress()
The owner connection is opened to owner member of the client in the cluster.
|
ClientPrincipal |
getPrincipal() |
void |
heartbeatResumed(Connection connection)
This event will be fired when the heartbeat is resumed for a connection to a member.
|
void |
heartbeatStopped(Connection connection)
This event will be fired when no heartbeat response is received for
com.hazelcast.client.spi.properties.ClientProperty.HEARTBEAT_TIMEOUT milliseconds from the member. |
protected void |
init() |
void |
setPrincipal(ClientPrincipal principal) |
void |
shutdown() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addMembershipListener, getClusterTime, getLocalClient, getMasterAddress, getMember, getMember, getMemberList, getMembers, getSize, getSize, removeMembershipListener
protected final HazelcastClientInstanceImpl client
public ClusterListenerSupport(HazelcastClientInstanceImpl client, Collection<AddressProvider> addressProviders)
protected void init()
public Address getOwnerConnectionAddress()
ClientClusterService
getOwnerConnectionAddress
in interface ClientClusterService
public void shutdown()
public ClientPrincipal getPrincipal()
public void setPrincipal(ClientPrincipal principal)
public void connectionAdded(Connection connection)
connectionAdded
in interface ConnectionListener
public void connectionRemoved(Connection connection)
connectionRemoved
in interface ConnectionListener
public void heartbeatResumed(Connection connection)
ConnectionHeartbeatListener
heartbeatResumed
in interface ConnectionHeartbeatListener
public void heartbeatStopped(Connection connection)
ConnectionHeartbeatListener
com.hazelcast.client.spi.properties.ClientProperty.HEARTBEAT_TIMEOUT
milliseconds from the member.heartbeatStopped
in interface ConnectionHeartbeatListener
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.