private List<Address> getReplicaAddresses(Collection<Address> excludedAddresses) {
        final Collection<Member> dataMembers = getNodeEngine().getClusterService()
                                                              .getMembers(MemberSelectors.DATA_MEMBER_SELECTOR);
        final int maxConfiguredReplicaCount = getNodeEngine().getConfig().findPNCounterConfig(name).getReplicaCount();
        final int currentReplicaCount = Math.min(maxConfiguredReplicaCount, dataMembers.size());
        final ArrayList<Address> replicaAddresses = new ArrayList<Address>(currentReplicaCount);
        final Iterator<Member> dataMemberIterator = dataMembers.iterator();

        for (int i = 0; i < currentReplicaCount; i++) {
            final Address dataMemberAddress = dataMemberIterator.next().getAddress();
            if (!excludedAddresses.contains(dataMemberAddress)) {
                replicaAddresses.add(dataMemberAddress);
            }
        }
        return replicaAddresses;
    }
private List < Address > getReplicaAddresses ( Collection < Address > excludedAddresses ) { final Collection < Member > dataMembers = getNodeEngine ( ) . getClusterService ( ) . getMembers ( MemberSelectors . DATA_MEMBER_SELECTOR ) ; final int maxConfiguredReplicaCount = getNodeEngine ( ) . getConfig ( ) . findPNCounterConfig ( name ) . getReplicaCount ( ) ; final int currentReplicaCount = Math . min ( maxConfiguredReplicaCount , dataMembers . size ( ) ) ; final ArrayList < Address > replicaAddresses = new ArrayList < Address > ( currentReplicaCount ) ; final Iterator < Member > dataMemberIterator = dataMembers . iterator ( ) ; for ( int i = 0 ; i < currentReplicaCount ; i ++ ) { final Address dataMemberAddress = dataMemberIterator . next ( ) . getAddress ( ) ; if ( ! excludedAddresses . contains ( dataMemberAddress ) ) { replicaAddresses . add ( dataMemberAddress ) ; } } return replicaAddresses ; }
Returns the addresses of the CRDT replicas from the current state of the
local membership list. Addresses contained in the {@code excludedAddresses}
collection are excluded.

@param excludedAddresses the addresses to exclude
@return list of possible CRDT replica addresses