|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.eff.UpdateEffsTask
This class encapsulates the logic for updating the effectivity vector of one or more EffManagedVersion objects, recording the history of effectivity changes as appropriate.
Field Summary | |
private EffChangeAudit |
audit
|
private ChangeActivityIfc |
authorizedBy
|
private static EffSet |
EMPTY_SET
|
private HashMap |
emvMap
|
private WTHashSet |
modifiedVersions
|
private static Boolean |
recordHistory
|
private static String |
RESOURCE
|
Constructor Summary | |
UpdateEffsTask(EffManagedVersion[] emvs,
ChangeActivityIfc authorizedBy)
Constructs a new UpdateEffsTask object for a particular batch of effectivity updates. |
Method Summary | |
private void |
advanceCreation(EffSet effSet)
Advances the creation audits of the specified Eff objects. |
private void |
advanceDeletion(EffSet effSet)
Advances the factual deletion audits of the specified Eff objects. |
private void |
delete(EffSet effSet)
Factually deletes specified Eff objects. |
private EffSet |
difference(EffSet a,
EffSet b)
|
private EffChangeAudit |
getAudit()
Returns a previously cached EffChangeAudit object, or a new one if none has been previously cached. |
private static boolean |
historyExists()
Returns true if and only if any effectivity history has been recorded in the system. |
private EffSet |
intersection(EffSet a,
EffSet b)
|
private static boolean |
isRecordHistory()
Returns true if and only if history should be recorded in general. |
private boolean |
isRecordHistory(EffManagedVersion emv,
int hSize,
int phSize)
Returns true if and only if effectivity history should be recorded for the specified EffManagedVersion object. |
private void |
remove(EffSet effSet)
Properly deletes (i.e., removes from persistence) the specified Eff objects. |
private void |
restore(EffSet effSet)
Restores from factual deletion the specified Eff objects. |
private void |
store(EffSet effSet)
Persist the specified new Eff objects. |
private EffSet |
union(EffSet a,
EffSet b)
|
void |
updateEffs(long emvBID,
EffSet newEffs,
EffHistoryMap antiHistoryMap,
int predHistSize)
Updates the effectivities of the specified EffManagedVersion. |
void |
updateVersions()
Nominally updates (i.e. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final EffSet EMPTY_SET
private static Boolean recordHistory
private HashMap emvMap
private ChangeActivityIfc authorizedBy
private EffChangeAudit audit
private WTHashSet modifiedVersions
Constructor Detail |
public UpdateEffsTask(EffManagedVersion[] emvs, ChangeActivityIfc authorizedBy)
emvs
- array of EffManagedVersions whose effectivity vectors will possibly be updated by this UpdateEffsTask
authorizedBy change activity object via which the effectivity update is being performed (for audit purposes); may be nullMethod Detail |
public void updateEffs(long emvBID, EffSet newEffs, EffHistoryMap antiHistoryMap, int predHistSize) throws WTPropertyVetoException, WTException
emvBID
- branch identifier of the EffManagedVersion whose effectivity is being updated
newEffs Set of Eff objects defining the new (cumulative) effectivity value for an implicitly given EffContext and Eff type
antiHistoryMap EffHistoryMap of the effectivity history for the specified EffManagedVersion for the same implicitly given EffContext and Eff type, in anti-chronological order (i.e. the first element of the map represents the current effectivity)
predHistSize the cardinality of the specified EffManagedVersion's predecessor's effectivity history (or zero if no such history exists) for the same implicitly given EffContext and Eff type
WTPropertyVetoException
WTException
public void updateVersions() throws WTException
WTException
private boolean isRecordHistory(EffManagedVersion emv, int hSize, int phSize) throws WTException, WTPropertyVetoException
emv
- EffManagedVersion for which effectivity history recording is to be determined
hSize the size of the argument EffManagedVersion's effectivity history for an implicitly given EffContext and Eff type
phSize the size of the argument EffManagedVersion's predecessor version's effectivity history for the same implicitly given EffContext and Eff type
WTException
WTPropertyVetoException
private static boolean isRecordHistory() throws WTException, WTPropertyVetoException
wt.eff.recordHistory
property
setting. If this setting is false
, but history has already
been recorded, then a WTException is thrown.
WTException
WTPropertyVetoException
private static boolean historyExists() throws WTException
WTException
private EffSet union(EffSet a, EffSet b)
private EffSet intersection(EffSet a, EffSet b)
private EffSet difference(EffSet a, EffSet b)
private void restore(EffSet effSet) throws WTPropertyVetoException, WTException
effSet
- EffSet of Eff objects that have previously been factually deleted, that are to be restored
WTPropertyVetoException
WTException
private void advanceCreation(EffSet effSet) throws WTPropertyVetoException, WTException
effSet
- EffSet of Eff objects whose creation is to be advanced
WTPropertyVetoException
WTException
private void advanceDeletion(EffSet effSet) throws WTPropertyVetoException, WTException
effSet
- EffSet of Eff objects whose factual deletion is to be advanced
WTPropertyVetoException
WTException
private void delete(EffSet effSet) throws WTPropertyVetoException, WTException
effSet
- EffSet of Eff objects to be factually deleted
WTPropertyVetoException
WTException
private void store(EffSet effSet) throws WTPropertyVetoException, WTException
effSet
- EffSet of new (non-persistent) Eff objects to be persisted
WTPropertyVetoException
WTException
private void remove(EffSet effSet) throws WTException
effSet
- EffSet of existing (persistent) Eff objects to be properly deleted
WTException
private EffChangeAudit getAudit() throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |