|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-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.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_service The associated service that this strategy attempts to co-locate partitions with. |
protected java.lang.String |
m_sService The name of the associated service. |
Fields inherited from class com.tangosol.net.partition.SimpleAssignmentStrategy |
---|
m_ctxLast, m_manager, MEMBERID_COMPARATOR |
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. |
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. |
Methods inherited from class com.tangosol.net.partition.SimpleAssignmentStrategy |
---|
analyzeDistribution, chainComparators, checkBackupBalance, checkBackupStrong, checkEndangered, checkLeaving, checkPrimaryBalance, cloneOwnership, doBalancePrimary, filterArray, filterSort, getBackupCount, getDescription, getLastAnalysisContext, getManager, getMember, getPartitionCount, instantiateAnalysisContext, instantiateLoadCalculator, setLastAnalysisContext, toString, validateBackups |
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 serviceMethod Detail |
---|
public PartitionedService getService()
protected void setAssociatedService(PartitionedService service)
service
- the associated servicepublic PartitionedService getAssociatedService()
protected boolean validateAssociatedService(PartitionedService service)
service
- the service to validateprotected void syncAssignments(SimpleAssignmentStrategy.AnalysisContext ctx, PartitionedService serviceThat)
ctx
- the analysis contextserviceThat
- the associated service whose partition assignments to syncpublic void init(DistributionManager manager)
init
in interface PartitionAssignmentStrategy
init
in class SimpleAssignmentStrategy
manager
- the DistributionManager that this strategy is bound toprotected PartitionedService bindService(java.lang.String sService)
sService
- the name of the service to bindprotected long analyzeDistribution(SimpleAssignmentStrategy.AnalysisContext ctx)
analyzeDistribution
in class SimpleAssignmentStrategy
ctx
- the analysis contextSimpleAssignmentStrategy.analyzeDistribution()
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)
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |