public abstract class ClusterListenerSupport extends Object implements ConnectionListener, ConnectionHeartbeatListener, ClientClusterService
Modifier and Type | Field and Description |
---|---|
protected HazelcastClientInstanceImpl |
client |
static long |
TERMINATE_TIMEOUT_SECONDS |
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
ClientProperty.HEARTBEAT_TIMEOUT milliseconds from the member. |
protected void |
init() |
void |
setOwnerConnectionAddress(Address ownerConnectionAddress) |
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
public static final long TERMINATE_TIMEOUT_SECONDS
protected final HazelcastClientInstanceImpl client
public ClusterListenerSupport(HazelcastClientInstanceImpl client, Collection<AddressProvider> addressProviders)
protected void init()
public Address getOwnerConnectionAddress()
ClientClusterService
getOwnerConnectionAddress
in interface ClientClusterService
public void setOwnerConnectionAddress(Address ownerConnectionAddress)
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
ClientProperty.HEARTBEAT_TIMEOUT
milliseconds from the member.heartbeatStopped
in interface ConnectionHeartbeatListener
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.