| 
 | Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
   com.tangosol.net.partition.SimpleAssignmentStrategy
com.tangosol.net.partition.SimpleAssignmentStrategy
       com.tangosol.net.partition.MirroringAssignmentStrategy
com.tangosol.net.partition.MirroringAssignmentStrategy
public class MirroringAssignmentStrategy
A PartitionAssignmentStrategy used by a service to attempt to co-locate the primary ownership of partitions on the same members as another service. This strategy does not guarantee that partitions will be co-located, but will make a best-effort attempt.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class com.tangosol.net.partition.SimpleAssignmentStrategy | 
|---|
| SimpleAssignmentStrategy.AnalysisContext, SimpleAssignmentStrategy.BackupStrength, SimpleAssignmentStrategy.LoadCalculator, SimpleAssignmentStrategy.SimpleLoadCalculator | 
| Field Summary | |
|---|---|
| protected  PartitionedService | m_serviceThe associated service that this strategy attempts to co-locate partitions with. | 
| protected  java.lang.String | m_sServiceThe name of the associated service. | 
| Fields inherited from class com.tangosol.net.partition.SimpleAssignmentStrategy | 
|---|
| m_ctxLast, m_manager, m_mapSuggestLast, m_setOwnersLast, MEMBERID_COMPARATOR, MSG_NO_PENDING, MSG_NO_RESULT | 
| Fields inherited from interface com.tangosol.net.partition.SimpleStrategyMBean | 
|---|
| NOTIFY_LOST | 
| Constructor Summary | |
|---|---|
| MirroringAssignmentStrategy(java.lang.String sService)Construct a MirroringAssignmentStrategy to be associated the specified service. | |
| Method Summary | |
|---|---|
| protected  long | analyzeDistribution(SimpleAssignmentStrategy.AnalysisContext ctx)Analyze the distribution using the specified analysis context. | 
| protected  PartitionedService | bindService(java.lang.String sService)Bind this assignment strategy to the specified partitioned service, and return the bound service. | 
|  PartitionedService | getAssociatedService()Return the associated service. | 
|  java.lang.String | getDescription()Return a human-readable description of the state of the partition assignment. | 
|  PartitionedService | getService()Return the partitioned service for which this assignment strategy controls the distribution. | 
|  void | init(DistributionManager manager)Initialize the PartitionAssignmentStrategy and bind it to the specified DistributionManager. | 
| protected  boolean | isRefinementNeeded(SimpleAssignmentStrategy.AnalysisContext ctx, PartitionedService serviceThis, PartitionedService serviceThat)Return true iff the partition assignments sync'd from the specified associated service should be further refined/balanced by the local assignment strategy. | 
| protected  void | setAssociatedService(PartitionedService service)Set the associated service. | 
| protected  void | syncAssignments(SimpleAssignmentStrategy.AnalysisContext ctx, PartitionedService serviceThat)Update the analysis context to reflect the partition assignments of the specified associated service. | 
| protected  boolean | validateAssociatedService(PartitionedService service)Validate that the distribution for the specified service is compatible with this service. | 
| Field Detail | 
|---|
protected PartitionedService m_service
protected java.lang.String m_sService
| Constructor Detail | 
|---|
public MirroringAssignmentStrategy(java.lang.String sService)
sService - the name of the associated service| Method Detail | 
|---|
public PartitionedService getService()
protected void setAssociatedService(PartitionedService service)
service - the associated servicepublic PartitionedService getAssociatedService()
protected boolean validateAssociatedService(PartitionedService service)
service - the service to validate
protected void syncAssignments(SimpleAssignmentStrategy.AnalysisContext ctx,
                               PartitionedService serviceThat)
ctx - the analysis contextserviceThat - the associated service whose partition assignments to syncprotected PartitionedService bindService(java.lang.String sService)
sService - the name of the service to bind
protected boolean isRefinementNeeded(SimpleAssignmentStrategy.AnalysisContext ctx,
                                     PartitionedService serviceThis,
                                     PartitionedService serviceThat)
ctx - the analysis contextserviceThis - the local serviceserviceThat - the associated service (may be null if unbound)public void init(DistributionManager manager)
analysis.init in interface PartitionAssignmentStrategyinit in class SimpleAssignmentStrategymanager - the DistributionManager that this strategy is bound topublic java.lang.String getDescription()
getDescription in interface PartitionAssignmentStrategygetDescription in class SimpleAssignmentStrategyprotected long analyzeDistribution(SimpleAssignmentStrategy.AnalysisContext ctx)
analyzeDistribution in class SimpleAssignmentStrategyctx - the analysis contextSimpleAssignmentStrategy.analyzeDistribution()| 
 | Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||