|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hazelcast.partition.PartitionServiceProxy
public class PartitionServiceProxy
| Nested Class Summary | |
|---|---|
class |
PartitionServiceProxy.PartitionProxy
|
| Constructor Summary | |
|---|---|
PartitionServiceProxy(InternalPartitionService partitionService)
|
|
| Method Summary | |
|---|---|
String |
addMigrationListener(MigrationListener migrationListener)
Adds a MigrationListener. |
boolean |
forceLocalMemberToBeSafe(long timeout,
TimeUnit unit)
Force the local member to be safe by checking and syncing partitions owned by the local member with at least one of the backups. |
PartitionServiceProxy.PartitionProxy |
getPartition(int partitionId)
|
PartitionServiceProxy.PartitionProxy |
getPartition(Object key)
Returns the partition that the given key belongs to. |
Set<Partition> |
getPartitions()
Returns a set containing all the Partitions in the cluster. |
boolean |
isClusterSafe()
Checks whether the cluster is in a safe state. |
boolean |
isLocalMemberSafe()
Check if the local member is safe to shutdown, meaning check if at least one backup of the partitions owned by the local member are in sync with primary. |
boolean |
isMemberSafe(Member member)
Check if the given member is safe to shutdown, meaning check if at least one backup of the partitions owned by the given member are in sync with primary. |
String |
randomPartitionKey()
Generates a random partition key. |
boolean |
removeMigrationListener(String registrationId)
Removes a MigrationListener. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PartitionServiceProxy(InternalPartitionService partitionService)
| Method Detail |
|---|
public String randomPartitionKey()
PartitionService
randomPartitionKey in interface PartitionServicepublic Set<Partition> getPartitions()
PartitionServicePartitions in the cluster.
getPartitions in interface PartitionServicepublic PartitionServiceProxy.PartitionProxy getPartition(Object key)
PartitionService
getPartition in interface PartitionServicekey - the given key
public String addMigrationListener(MigrationListener migrationListener)
PartitionServicePartitionService.removeMigrationListener(String) method.
There is no check for duplicate registrations, so if you register the listener twice, it will get events twice.
addMigrationListener in interface PartitionServicemigrationListener - the added MigrationListener
PartitionService.removeMigrationListener(String)public boolean removeMigrationListener(String registrationId)
PartitionService
removeMigrationListener in interface PartitionServiceregistrationId - the registration id of the listener to remove.
PartitionService.addMigrationListener(MigrationListener)public boolean isClusterSafe()
PartitionService
isClusterSafe in interface PartitionServicepublic boolean isMemberSafe(Member member)
PartitionService
isMemberSafe in interface PartitionServicemember - the cluster member to query.
public boolean isLocalMemberSafe()
PartitionService
isLocalMemberSafe in interface PartitionService
public boolean forceLocalMemberToBeSafe(long timeout,
TimeUnit unit)
PartitionService
forceLocalMemberToBeSafe in interface PartitionServicetimeout - the time limit for checking/syncing with the backupunit - the unit of time for timeoutpublic PartitionServiceProxy.PartitionProxy getPartition(int partitionId)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||