Search in sources :

Example 1 with DATA_MEMBER_SELECTOR

use of com.hazelcast.cluster.memberselector.MemberSelectors.DATA_MEMBER_SELECTOR in project hazelcast by hazelcast.

the class PartitionStateManager method createMemberGroups.

private Collection<MemberGroup> createMemberGroups(final Set<Member> excludedMembers) {
    MemberSelector exclude = member -> !excludedMembers.contains(member);
    final MemberSelector selector = MemberSelectors.and(DATA_MEMBER_SELECTOR, exclude);
    final Collection<Member> members = node.getClusterService().getMembers(selector);
    return memberGroupFactory.createMemberGroups(members);
}
Also used : Address(com.hazelcast.cluster.Address) NodeExtension(com.hazelcast.instance.impl.NodeExtension) Member(com.hazelcast.cluster.Member) MemberGroupFactoryFactory(com.hazelcast.internal.partition.membergroup.MemberGroupFactoryFactory) PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_LOCAL_PARTITION_COUNT(com.hazelcast.internal.metrics.MetricDescriptorConstants.PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_LOCAL_PARTITION_COUNT) PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_STAMP(com.hazelcast.internal.metrics.MetricDescriptorConstants.PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_STAMP) ConcurrentMap(java.util.concurrent.ConcurrentMap) ClusterService(com.hazelcast.internal.cluster.ClusterService) PartitionTableView(com.hazelcast.internal.partition.PartitionTableView) DATA_MEMBER_SELECTOR(com.hazelcast.cluster.memberselector.MemberSelectors.DATA_MEMBER_SELECTOR) ILogger(com.hazelcast.logging.ILogger) PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_PARTITION_COUNT(com.hazelcast.internal.metrics.MetricDescriptorConstants.PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_PARTITION_COUNT) PartitionReplica(com.hazelcast.internal.partition.PartitionReplica) ClusterServiceImpl(com.hazelcast.internal.cluster.impl.ClusterServiceImpl) MemberGroup(com.hazelcast.spi.partitiongroup.MemberGroup) HazelcastException(com.hazelcast.core.HazelcastException) PartitionReplicaInterceptor(com.hazelcast.internal.partition.PartitionReplicaInterceptor) InternalPartition(com.hazelcast.internal.partition.InternalPartition) Probe(com.hazelcast.internal.metrics.Probe) Collection(java.util.Collection) MemberGroupFactory(com.hazelcast.internal.partition.membergroup.MemberGroupFactory) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_ACTIVE_PARTITION_COUNT(com.hazelcast.internal.metrics.MetricDescriptorConstants.PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_ACTIVE_PARTITION_COUNT) Set(java.util.Set) UUID(java.util.UUID) PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_MEMBER_GROUP_SIZE(com.hazelcast.internal.metrics.MetricDescriptorConstants.PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_MEMBER_GROUP_SIZE) ReadonlyInternalPartition(com.hazelcast.internal.partition.ReadonlyInternalPartition) Node(com.hazelcast.instance.impl.Node) MemberSelector(com.hazelcast.cluster.MemberSelector) ClusterState(com.hazelcast.cluster.ClusterState) MemberSelectors(com.hazelcast.cluster.memberselector.MemberSelectors) PartitionStateGenerator(com.hazelcast.internal.partition.PartitionStateGenerator) Collections(java.util.Collections) PartitionStampUtil.calculateStamp(com.hazelcast.internal.partition.PartitionStampUtil.calculateStamp) MemberSelector(com.hazelcast.cluster.MemberSelector) Member(com.hazelcast.cluster.Member)

Aggregations

Address (com.hazelcast.cluster.Address)1 ClusterState (com.hazelcast.cluster.ClusterState)1 Member (com.hazelcast.cluster.Member)1 MemberSelector (com.hazelcast.cluster.MemberSelector)1 MemberSelectors (com.hazelcast.cluster.memberselector.MemberSelectors)1 DATA_MEMBER_SELECTOR (com.hazelcast.cluster.memberselector.MemberSelectors.DATA_MEMBER_SELECTOR)1 HazelcastException (com.hazelcast.core.HazelcastException)1 Node (com.hazelcast.instance.impl.Node)1 NodeExtension (com.hazelcast.instance.impl.NodeExtension)1 ClusterService (com.hazelcast.internal.cluster.ClusterService)1 ClusterServiceImpl (com.hazelcast.internal.cluster.impl.ClusterServiceImpl)1 PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_ACTIVE_PARTITION_COUNT (com.hazelcast.internal.metrics.MetricDescriptorConstants.PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_ACTIVE_PARTITION_COUNT)1 PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_LOCAL_PARTITION_COUNT (com.hazelcast.internal.metrics.MetricDescriptorConstants.PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_LOCAL_PARTITION_COUNT)1 PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_MEMBER_GROUP_SIZE (com.hazelcast.internal.metrics.MetricDescriptorConstants.PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_MEMBER_GROUP_SIZE)1 PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_PARTITION_COUNT (com.hazelcast.internal.metrics.MetricDescriptorConstants.PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_PARTITION_COUNT)1 PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_STAMP (com.hazelcast.internal.metrics.MetricDescriptorConstants.PARTITIONS_METRIC_PARTITION_REPLICA_STATE_MANAGER_STAMP)1 Probe (com.hazelcast.internal.metrics.Probe)1 InternalPartition (com.hazelcast.internal.partition.InternalPartition)1 PartitionReplica (com.hazelcast.internal.partition.PartitionReplica)1 PartitionReplicaInterceptor (com.hazelcast.internal.partition.PartitionReplicaInterceptor)1