Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.1.0

E18814-01


com.tangosol.net.partition
Interface PartitionAssignmentStrategy


public interface PartitionAssignmentStrategy

A PartitionAssignmentStrategy is a pluggable strategy for assigning partition primary and backup ownership to cluster members.

Since:
Coherence 3.0

Method Summary
 Member getBackupOwner(int nPartition, int nBackup)
          Determine the backup owner of the specified partition.
 Member getPartitionOwner(int nPartition)
          Determine the primary owner of the specified partition.

 

Method Detail

getPartitionOwner

Member getPartitionOwner(int nPartition)
Determine the primary owner of the specified partition.
Parameters:
nPartition - a partition ID
Returns:
the cluster Member that is currently the owner for the specified partition; could be null if the distribution is currently in progress
Throws:
java.lang.IllegalArgumentException - if the partition number is negative or greater than the partition count for this partitioned service
Since:
Coherence 3.5

getBackupOwner

Member getBackupOwner(int nPartition,
                      int nBackup)
Determine the backup owner of the specified partition.
Parameters:
nPartition - a partition ID
nBackup - the backup number (one-based)
Returns:
the cluster Member that is currently the owner for the specified backup copy for the given partition; could be null if the distribution is currently in progress
Throws:
java.lang.IllegalArgumentException - if the partition number is negative or greater than the partition count or if the backup number is non-positive or greater than the backup count for this partitioned service
Since:
Coherence 3.6

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.1.0

E18814-01


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