Package com.tangosol.net.partition
Class SimpleAssignmentStrategy.BackupStrength
java.lang.Object
com.tangosol.net.partition.SimpleAssignmentStrategy.BackupStrength
- Enclosing class:
- SimpleAssignmentStrategy
BackupStrength represents a level of "strength" or "resiliency" between
 the primary and backup owners of a partition.  The BackupStrength is used
 to determine which backup owners could serve as a "strong" backup for a
 primary owner.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected intThe strength (one of the *_SAFE constants).protected SetThe set of machine names.protected SetThe set of rack names.protected SetThe set of site names.protected static final intMachine-safety (members are on different machines).protected static final intNode-safety (members are different).protected static final intRack-safety (members are on different racks).protected static final intSite-safety (members are on different sites).
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedBackupStrength(int nStrength, Set setSites, Set setRacks, Set setMachines) Construct a BackupStrength of the specified strength.
- 
Method SummaryModifier and TypeMethodDescriptionReturn a human-readable description string of this backup-strength.intReturn the site count.intReturn the rack count.intReturn the site count.protected SimpleAssignmentStrategy.BackupStrengthReturn the next weakest BackupStrength.protected booleanReturn true iff the specified members are mutually "strong".toString()
- 
Field Details- 
NODE_SAFEprotected static final int NODE_SAFENode-safety (members are different).- See Also:
 
- 
MACHINE_SAFEprotected static final int MACHINE_SAFEMachine-safety (members are on different machines).- See Also:
 
- 
RACK_SAFEprotected static final int RACK_SAFERack-safety (members are on different racks).- See Also:
 
- 
SITE_SAFEprotected static final int SITE_SAFESite-safety (members are on different sites).- See Also:
 
- 
m_nStrengthprotected int m_nStrengthThe strength (one of the *_SAFE constants).
- 
m_setSitesThe set of site names.
- 
m_setRacksThe set of rack names.
- 
m_setMachinesThe set of machine names.
 
- 
- 
Constructor Details- 
BackupStrengthConstruct a BackupStrength of the specified strength.- Parameters:
- nStrength- one of the BackupStrength.*_SAFE constants
- setSites- the site names
- setRacks- the rack names
- setMachines- the machine names
 
 
- 
- 
Method Details- 
getWeakerReturn the next weakest BackupStrength.- Returns:
- a BackupStrength that is immediately weaker than this
 
- 
isStrongReturn true iff the specified members are mutually "strong".- Parameters:
- member1- the first member to compare
- member2- the second member to compare
- Returns:
- true iff the specified members are mutually "strong"
 
- 
getSiteCountpublic int getSiteCount()Return the site count.- Returns:
- the site count
 
- 
getRackCountpublic int getRackCount()Return the rack count.- Returns:
- the rack count
 
- 
getMachineCountpublic int getMachineCount()Return the site count.- Returns:
- the site count
 
- 
getDescriptionReturn a human-readable description string of this backup-strength.- Returns:
- a human-readable description string of this backup-strength
 
- 
toString
 
-