Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


com.tangosol.net.partition
Interface DistributionManager


public interface DistributionManager

A DistributionManager coordinates the distribution of partitions for a partitioned service. The DistributionManager relies on a pluggable PartitionAssignmentStrategy to analyze the current state of the partition usage, and formulate a desired distribution plan. The DistributionManager is responsible for gathering and providing to the strategy the state necessary to make distribution decisions, as well as collecting and enacting the formulated distribution recommendations.

The DistributionManager provides a consistent and stable view of Service-related state for the duration of the call to PartitionAssignmentStrategy.analyzeDistribution().

Since:
Coherence 3.7
Author:
rhl 2010.10.22

Method Summary
 Member getMember(int nMemberId)
          Return the ownership-enabled service member with the specified mini-id, or null if the member does not exist.
 PartitionSet getOwnedPartitions(Member member, int iStore)
          Return the set of partitions for which the specified member owns the specified storage index (replica).
 java.util.Set getOwnershipLeavingMembers()
          Return the set of ownership-enabled members in the partitioned service that are in the process of leaving.
 java.util.Set getOwnershipMembers()
          Return the set of ownership-enabled members in the partitioned service.
 Ownership getPartitionOwnership(int nPartition)
          Return the Ownership information for the specified partition.
 PartitionedService getService()
          Return the partitioned service for which this DistributionManager coordinates the distribution.
 void suggest(PartitionSet parts, Ownership ownership)
          Suggest a distribution change for the specified set of partitions, indicating either primary or backup transfer (or both).

 

Method Detail

getService

PartitionedService getService()
Return the partitioned service for which this DistributionManager coordinates the distribution.
Returns:
the partitioned service

getMember

Member getMember(int nMemberId)
Return the ownership-enabled service member with the specified mini-id, or null if the member does not exist.
Parameters:
nMemberId - the mini-id
Returns:
the ownership-enabled service member with the specified mini-id, or null

getOwnershipMembers

java.util.Set getOwnershipMembers()
Return the set of ownership-enabled members in the partitioned service.
Returns:
the set of ownership-enabled members

getOwnershipLeavingMembers

java.util.Set getOwnershipLeavingMembers()
Return the set of ownership-enabled members in the partitioned service that are in the process of leaving.
Returns:
the set of ownership-enabled members that are leaving

getOwnedPartitions

PartitionSet getOwnedPartitions(Member member,
                                int iStore)
Return the set of partitions for which the specified member owns the specified storage index (replica).
Parameters:
member - the member to determine the the ownership for
iStore - the storage index (zero for primary)
Returns:
the set of partitions
Throws:
java.lang.IllegalArgumentException - if the backup number is non-positive or greater than the backup count for this partitioned service

getPartitionOwnership

Ownership getPartitionOwnership(int nPartition)
Return the Ownership information for the specified partition.
Parameters:
nPartition - the partition to return the ownership for
Returns:
Ownership information for the specified partition
Throws:
java.lang.IllegalArgumentException - if the partition number is negative or greater than the partition count for this partitioned service

suggest

void suggest(PartitionSet parts,
             Ownership ownership)
Suggest a distribution change for the specified set of partitions, indicating either primary or backup transfer (or both). The desired transfer is specified as the ownership that would result from enacting the transfer.

Note: this method does not in any way enforce or guarantee that the specified transfers are performed; it merely provides advice

Parameters:
parts - the set of partitions to perform distribution on
ownership - the desired ownership

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.