|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.system.server.profileservice.repository.clustered.sync.AbstractSynchronizationPolicy
org.jboss.profileservice.cluster.repository.DefaultSynchronizationPolicy
public class DefaultSynchronizationPolicy
Default implementation of SynchronizationPolicy
.
Field Summary |
---|
Fields inherited from class org.jboss.system.server.profileservice.repository.clustered.sync.AbstractSynchronizationPolicy |
---|
DEFAULT_REMOVAL_TRACKING_TIME |
Constructor Summary | |
---|---|
DefaultSynchronizationPolicy()
|
Method Summary | |
---|---|
protected boolean |
acceptAddition(RepositoryItemMetadata toAdd,
RepositoryItemMetadata joinersPrevious,
boolean merge)
Always accepts merge additions; accepts join additions if the time-discrepancy adjusted timestamp of toAdd is later than
the current time minus the maximum
period we track item removals . |
protected boolean |
acceptReincarnation(RepositoryItemMetadata reincarnation,
RepositoryItemMetadata current,
boolean merge)
Accepts the reincarnation if the time-discrepancy adjusted timestamp of reincarnation is at least as recent as the time-discrepancy
adjusted timestamp of the current item. |
protected boolean |
acceptRemoval(RepositoryItemMetadata current,
RepositoryItemMetadata sendersView,
boolean merge)
Rejects removal if sendersView is null , else
accepts the removal if the time-discrepancy adjusted timestamp of
sendersView is at least as recent as the time-discrepancy
adjusted timestamp of the current item. |
protected boolean |
acceptUpdate(RepositoryItemMetadata update,
RepositoryItemMetadata current,
boolean merge)
Accepts the removal if the time-discrepancy adjusted timestamp of update is at least as recent as the time-discrepancy
adjusted timestamp of the current item. |
TimestampDiscrepancyService |
getTimestampService()
|
void |
setTimestampService(TimestampDiscrepancyService timestampService)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultSynchronizationPolicy()
Method Detail |
---|
public TimestampDiscrepancyService getTimestampService()
public void setTimestampService(TimestampDiscrepancyService timestampService)
protected boolean acceptAddition(RepositoryItemMetadata toAdd, RepositoryItemMetadata joinersPrevious, boolean merge)
toAdd
is later than
the current time minus the maximum
period we track item removals
. The idea of the latter being that if
a previous version of toAdd
was removed more recently than
that then we should have a record of its removal.
acceptAddition
in class AbstractSynchronizationPolicy
protected boolean acceptReincarnation(RepositoryItemMetadata reincarnation, RepositoryItemMetadata current, boolean merge)
reincarnation
is at least as recent as the time-discrepancy
adjusted timestamp of the current
item.
acceptReincarnation
in class AbstractSynchronizationPolicy
protected boolean acceptRemoval(RepositoryItemMetadata current, RepositoryItemMetadata sendersView, boolean merge)
sendersView
is null
, else
accepts the removal if the time-discrepancy adjusted timestamp of
sendersView
is at least as recent as the time-discrepancy
adjusted timestamp of the current
item.
acceptRemoval
in class AbstractSynchronizationPolicy
protected boolean acceptUpdate(RepositoryItemMetadata update, RepositoryItemMetadata current, boolean merge)
update
is at least as recent as the time-discrepancy
adjusted timestamp of the current
item.
acceptUpdate
in class AbstractSynchronizationPolicy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |