public final class ClientPartitionServiceImpl extends com.hazelcast.client.impl.protocol.codec.ClientAddPartitionListenerCodec.AbstractEventHandler implements EventHandler<ClientMessage>, ClientPartitionService
ClientPartitionService
implementation.Constructor and Description |
---|
ClientPartitionServiceImpl(HazelcastClientInstanceImpl client) |
Modifier and Type | Method and Description |
---|---|
void |
beforeClusterSwitch(CandidateClusterContext context) |
void |
beforeListenerRegister()
This method is called before registration request is sent to node.
|
Partition |
getPartition(int partitionId) |
int |
getPartitionCount() |
int |
getPartitionId(Data key) |
int |
getPartitionId(Object key) |
Address |
getPartitionOwner(int partitionId) |
void |
handlePartitionsEventV15(Collection<Map.Entry<Address,List<Integer>>> collection,
int partitionStateVersion) |
boolean |
isPartitionCountConsistent(int partitionCount) |
void |
listenPartitionTable(Connection ownerConnection) |
void |
onListenerRegister()
This method is called when registration request response is successfully returned from node.
|
void |
refreshPartitions() |
void |
start() |
void |
stop() |
handle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handle
public ClientPartitionServiceImpl(HazelcastClientInstanceImpl client)
public void start()
public void listenPartitionTable(Connection ownerConnection) throws Exception
Exception
public void refreshPartitions()
public void handlePartitionsEventV15(Collection<Map.Entry<Address,List<Integer>>> collection, int partitionStateVersion)
handlePartitionsEventV15
in class com.hazelcast.client.impl.protocol.codec.ClientAddPartitionListenerCodec.AbstractEventHandler
public void beforeListenerRegister()
EventHandler
beforeListenerRegister
in interface EventHandler<ClientMessage>
public void onListenerRegister()
EventHandler
onListenerRegister
in interface EventHandler<ClientMessage>
public void stop()
public Address getPartitionOwner(int partitionId)
getPartitionOwner
in interface ClientPartitionService
public int getPartitionId(Data key)
getPartitionId
in interface ClientPartitionService
public int getPartitionId(Object key)
getPartitionId
in interface ClientPartitionService
public int getPartitionCount()
getPartitionCount
in interface ClientPartitionService
public Partition getPartition(int partitionId)
getPartition
in interface ClientPartitionService
public boolean isPartitionCountConsistent(int partitionCount)
isPartitionCountConsistent
in interface ClientPartitionService
partitionCount
- new partition countpublic void beforeClusterSwitch(CandidateClusterContext context)
beforeClusterSwitch
in interface ClusterSwitchAwareService
Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.