Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.util
Class NullImplementation.NullPartitionAssignmentStrategy

java.lang.Object
  extended by com.tangosol.util.NullImplementation.NullPartitionAssignmentStrategy

All Implemented Interfaces:
PartitionAssignmentStrategy
Enclosing class:
NullImplementation

public static class NullImplementation.NullPartitionAssignmentStrategy
extends java.lang.Object
implements PartitionAssignmentStrategy

An implementation of PartitionAssignmentStrategy that does nothing.


Field Summary
static NullImplementation.NullPartitionAssignmentStrategy INSTANCE
          Singleton instance.

 

Constructor Summary
NullImplementation.NullPartitionAssignmentStrategy()
           

 

Method Summary
 long analyzeDistribution()
          Analyze the distribution and return the desired time interval before the next distribution analysis.
 void analyzeOrphans(java.util.Map mapConstraints)
          Analyze and suggest the assignment of orphaned partitions (partitions without an active primary or backup owner) subject to the specified constraints.
 java.lang.String getDescription()
          Return a human-readable description of the state of the partition assignment.
 void init(DistributionManager manager)
          Initialize the PartitionAssignmentStrategy and bind it to the specified DistributionManager.

 

Field Detail

INSTANCE

public static final NullImplementation.NullPartitionAssignmentStrategy INSTANCE
Singleton instance.

Constructor Detail

NullImplementation.NullPartitionAssignmentStrategy

public NullImplementation.NullPartitionAssignmentStrategy()

Method Detail

init

public void init(DistributionManager manager)
Initialize the PartitionAssignmentStrategy and bind it to the specified DistributionManager. This method is called only on the distribution coordinator, prior its first distribution analysis.
Specified by:
init in interface PartitionAssignmentStrategy
Parameters:
manager - the DistributionManager that this strategy is bound to

analyzeOrphans

public void analyzeOrphans(java.util.Map mapConstraints)
Analyze and suggest the assignment of orphaned partitions (partitions without an active primary or backup owner) subject to the specified constraints. For each partition, the supplied constraints specify the set of members which are eligible to be assigned the ownership.

The strategy must provide suggestions for all orphaned partitions which are consistent with the supplied constraints. Failure to provide a complete set of valid suggestions may result in the loss of partition data.

Specified by:
analyzeOrphans in interface PartitionAssignmentStrategy
Parameters:
mapConstraints - the map of assignment constraints associating members with the set of partitions that they could be assigned ownership of

analyzeDistribution

public long analyzeDistribution()
Analyze the distribution and return the desired time interval before the next distribution analysis. This method may or may not make distribution suggestions through the distribution manager. The strategy can influence (but not guarantee) the frequency with which it is analyzed by returning the desired interval before the next call, or -1 if the strategy has no preference and will rely on the PartitionedService to decide.

As a result of failover, partitions may become 'endangered', meaning that the necessary number of backups do not exist. Failure to suggest a distribution recovery plan for those partitions may result in the partition remaining in the endangered state. Additionally, ownership-enabled service members that are in the process of shutting down will wait until all owned partitions are transferred out. Failure to suggest a distribution plan may delay the exit of these leaving members.

The statistics and ownership information exposed by the DistributionManager will not mutate for the duration of this method call.

Specified by:
analyzeDistribution in interface PartitionAssignmentStrategy
Returns:
the time interval before the next desired analysis, or -1

getDescription

public java.lang.String getDescription()
Return a human-readable description of the state of the partition assignment.
Specified by:
getDescription in interface PartitionAssignmentStrategy
Returns:
a human-readable description

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


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