|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.mdm.index.survivor.impl.WeightedSurvivorStrategy
Strategy for determing survivor. Calculates utility based on preference and quality.
Field Summary | |
static java.lang.String |
FLD_LAST_MODIFIED
last modified constant |
Constructor Summary | |
WeightedSurvivorStrategy()
Creates new MySurvivalStrategy |
Method Summary | |
java.lang.Object |
clone()
returns a clone of the object |
void |
init(java.util.Collection parameters)
Initializes the survivor strategy object. Call this method after creating the object. |
protected void |
processMostRecentModified(SurvivorQuality q,
java.util.Map scores,
java.lang.String candidateId,
SystemFieldListMap fields)
|
protected void |
processSourceSystem(SurvivorQuality q,
java.util.Map scores,
java.lang.String candidateId,
SystemFieldListMap fields)
determine the utility for the SourceSystem quality |
protected void |
processSystemAgreement(SurvivorQuality q,
java.util.Map scores,
java.lang.String candidateId,
SystemFieldListMap fields)
Given m source systems and n aggrements. |
SystemField |
selectField(java.lang.String candidateId,
SystemFieldListMap fields)
Calculates the survivor value by using a MaxHeap to accrue utility scores. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String FLD_LAST_MODIFIED
Constructor Detail |
public WeightedSurvivorStrategy()
Method Detail |
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface SurvivorStrategyInterface
java.lang.CloneNotSupportedException
- cloning not supportedpublic void init(java.util.Collection parameters) throws StrategyCreationException
init
in interface SurvivorStrategyInterface
parameters
- list of parameters used to initialize the strategy
StrategyCreationException
- missing required parameterprotected void processMostRecentModified(SurvivorQuality q, java.util.Map scores, java.lang.String candidateId, SystemFieldListMap fields) throws SurvivorCalculationException
q
- quality configuration from user defined XMLscores
- reference to the scores MaxHeapcandidateId
- field name of the set of values to be compared. Ignored for this qualityfields
- set of fields for each system
SurvivorCalculationException
- if a expect value is not presentprotected void processSourceSystem(SurvivorQuality q, java.util.Map scores, java.lang.String candidateId, SystemFieldListMap fields) throws SurvivorCalculationException
q
- quality configuration from user defined XMLscores
- reference to the scores MaxHeapcandidateId
- field name of the set of values to be compared. Ignored for this qualityfields
- set of fields for each system
SurvivorCalculationException
- preferred system id does not exist in actual field list map parameterprotected void processSystemAgreement(SurvivorQuality q, java.util.Map scores, java.lang.String candidateId, SystemFieldListMap fields) throws SurvivorCalculationException
q
- quality configuration from user defined XMLscores
- reference to the scores MaxHeapcandidateId
- field name of the set of values to be compared. Ignored for this qualityfields
- set of fields for each system
SurvivorCalculationException
- unexpected valuespublic SystemField selectField(java.lang.String candidateId, SystemFieldListMap fields) throws SurvivorCalculationException
selectField
in interface SurvivorStrategyInterface
candidateId
- current candidate field to work withfields
- set of fields associated with each system
SurvivorCalculationException
- no rule has been defined for this candidate field
value not found for this candidate field
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Sun Microsystems, Inc.