org.jboss.system.server.profileservice.repository.clustered.sync
Class ImmutableSynchronizationPolicy

java.lang.Object
  extended by org.jboss.system.server.profileservice.repository.clustered.sync.ImmutableSynchronizationPolicy
All Implemented Interfaces:
SynchronizationPolicy

public class ImmutableSynchronizationPolicy
extends Object
implements SynchronizationPolicy

SynchronizationPolicy that does not accept any changes.

Version:
$Revision: $
Author:
Brian Stansberry

Constructor Summary
ImmutableSynchronizationPolicy()
           
 
Method Summary
 boolean acceptJoinAddition(RepositoryItemMetadata toAdd, RepositoryItemMetadata joinersPrevious)
          Always returns false Should the item represented by toAdd that is available on a newly joining node be accepted for use around the cluster when the cluster's records show no record of an item with the same path? Such a case potentially could mean newly joining node was unaware of an earlier removal that occurred while it was offline and that the cluster has also purged from its records.
 boolean acceptJoinReincarnation(RepositoryItemMetadata reincarnation, RepositoryItemMetadata current)
          Always returns false Should the item represented by reincarnation that is available on a newly joining node be accepted for use around the cluster when the cluster's records show an item with the same path was previously removed? Such a case potentially could mean the newly joining node was unaware of a removal that occurred while it was offline.
 boolean acceptJoinRemoval(RepositoryItemMetadata current, RepositoryItemMetadata joinersItem)
          Always returns false Should the item represented by toRemovethat is unavailable on a merging set of nodes be removed from around the cluster when the cluster's records show an item with the same path? Such a case potentially could mean the newly joining node was unaware of a new deployment of the item that occurred while it was offline.
 boolean acceptJoinUpdate(RepositoryItemMetadata update, RepositoryItemMetadata current)
          Always returns false Should the item represented by update that is available on a newly joining node be accepted for use around the cluster when the cluster's records show an item with the same path with a different version? Such a case potentially could mean the newly joining node was unaware of changes that occurred while it was offline.
 boolean acceptMergeAddition(RepositoryItemMetadata toAdd)
          Always returns false Should the item represented by toAdd that is available on a merging set of nodes be accepted for use around the cluster when the cluster's records show no record of an item with the same path? Such a case potentially could mean the merging nodes were unaware of an earlier removal that occurred while the cluster was split and that the cluster has also purged from its records.
 boolean acceptMergeReincarnation(RepositoryItemMetadata reincarnation, RepositoryItemMetadata current)
          Always returns false Should the item represented by reincarnation that is available on a merging set of nodes be accepted for use around the cluster when the cluster's records show an item with the same path was previously removed? Such a case potentially could mean the merging nodes were unaware of a removal that occurred while the cluster was split.
 boolean acceptMergeRemoval(RepositoryItemMetadata current, RepositoryItemMetadata mergersView)
          Always returns false Should the item represented by toRemove that is unavailable on a newly joining node be removed from around the cluster when the cluster's records show an item with the same path? Such a case potentially could mean the newly joining node was unaware of a new deployment of the item that occurred while the cluster was split.
 boolean acceptMergeUpdate(RepositoryItemMetadata update, RepositoryItemMetadata current)
          Always returns false Should the item represented by update that is available on a merging set of nodes be accepted for use around the cluster when the cluster's records show an item with the same path with a different version? Such a case potentially could mean the merging nodes were unaware of changes that occurred while the cluster was split.
 boolean purgeRemovedItems(RepositoryContentMetadata content)
          Always returns false Request that the policy remove any RepositoryItemMetadata objects that are listed as removed if the policy no longer wishes to consider them in its decision making.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImmutableSynchronizationPolicy

public ImmutableSynchronizationPolicy()
Method Detail

acceptJoinAddition

public boolean acceptJoinAddition(RepositoryItemMetadata toAdd,
                                  RepositoryItemMetadata joinersPrevious)
Always returns false Should the item represented by toAdd that is available on a newly joining node be accepted for use around the cluster when the cluster's records show no record of an item with the same path? Such a case potentially could mean newly joining node was unaware of an earlier removal that occurred while it was offline and that the cluster has also purged from its records.

Specified by:
acceptJoinAddition in interface SynchronizationPolicy
Parameters:
toAdd - the item to add
joinersPrevious - information, if available, on the timestamp of the item that was present on the joining node when it stopped. May be null, indicating the joining node was unaware of the item when stopped.
Returns:
false

acceptJoinReincarnation

public boolean acceptJoinReincarnation(RepositoryItemMetadata reincarnation,
                                       RepositoryItemMetadata current)
Always returns false Should the item represented by reincarnation that is available on a newly joining node be accepted for use around the cluster when the cluster's records show an item with the same path was previously removed? Such a case potentially could mean the newly joining node was unaware of a removal that occurred while it was offline.

Specified by:
acceptJoinReincarnation in interface SynchronizationPolicy
Parameters:
reincarnation - the new version of the item
current - the cluster's current version of the item, showing when it was removed and by whom. The "when" should reflect this node's time of removal, not the time on the node that originated the removal.
Returns:
false

acceptJoinRemoval

public boolean acceptJoinRemoval(RepositoryItemMetadata current,
                                 RepositoryItemMetadata joinersItem)
Always returns false Should the item represented by toRemovethat is unavailable on a merging set of nodes be removed from around the cluster when the cluster's records show an item with the same path? Such a case potentially could mean the newly joining node was unaware of a new deployment of the item that occurred while it was offline.

Specified by:
acceptJoinRemoval in interface SynchronizationPolicy
Parameters:
current - the cluster's current version of the item
joinersItem - the joining node's view of item to remove. May be null, indicating the sender is unaware of the item. If not null, the timestamp of this item should reflect when the item was removed, if known. If the time the item was removed is not known, the timestamp should reflect the last known timestamp of the item that was removed.
Returns:
false

acceptJoinUpdate

public boolean acceptJoinUpdate(RepositoryItemMetadata update,
                                RepositoryItemMetadata current)
Always returns false Should the item represented by update that is available on a newly joining node be accepted for use around the cluster when the cluster's records show an item with the same path with a different version? Such a case potentially could mean the newly joining node was unaware of changes that occurred while it was offline.

Specified by:
acceptJoinUpdate in interface SynchronizationPolicy
Parameters:
update - the new version of the item
current - the cluster's current version of the item
Returns:
false

acceptMergeAddition

public boolean acceptMergeAddition(RepositoryItemMetadata toAdd)
Always returns false Should the item represented by toAdd that is available on a merging set of nodes be accepted for use around the cluster when the cluster's records show no record of an item with the same path? Such a case potentially could mean the merging nodes were unaware of an earlier removal that occurred while the cluster was split and that the cluster has also purged from its records.

Specified by:
acceptMergeAddition in interface SynchronizationPolicy
Parameters:
toAdd - the item to add
Returns:
false

acceptMergeReincarnation

public boolean acceptMergeReincarnation(RepositoryItemMetadata reincarnation,
                                        RepositoryItemMetadata current)
Always returns false Should the item represented by reincarnation that is available on a merging set of nodes be accepted for use around the cluster when the cluster's records show an item with the same path was previously removed? Such a case potentially could mean the merging nodes were unaware of a removal that occurred while the cluster was split.

Specified by:
acceptMergeReincarnation in interface SynchronizationPolicy
Parameters:
reincarnation - the new version of the item
current - the cluster's current version of the item, showing when it was removed and by whom
Returns:
false

acceptMergeRemoval

public boolean acceptMergeRemoval(RepositoryItemMetadata current,
                                  RepositoryItemMetadata mergersView)
Always returns false Should the item represented by toRemove that is unavailable on a newly joining node be removed from around the cluster when the cluster's records show an item with the same path? Such a case potentially could mean the newly joining node was unaware of a new deployment of the item that occurred while the cluster was split.

Specified by:
acceptMergeRemoval in interface SynchronizationPolicy
Parameters:
current - the cluster's current version of the item
mergersView - the merging node's view of item to remove. May be null, indicating the sender is unaware of the item. If not null, the timestamp of this item should reflect when the item was removed, if known. If the time the item was removed is not known, the timestamp should reflect the last known timestamp of the item that was removed.
Returns:
false

acceptMergeUpdate

public boolean acceptMergeUpdate(RepositoryItemMetadata update,
                                 RepositoryItemMetadata current)
Always returns false Should the item represented by update that is available on a merging set of nodes be accepted for use around the cluster when the cluster's records show an item with the same path with a different version? Such a case potentially could mean the merging nodes were unaware of changes that occurred while the cluster was split.

Specified by:
acceptMergeUpdate in interface SynchronizationPolicy
Parameters:
update - the new version of the item
current - the cluster's current version of the item
Returns:
false

purgeRemovedItems

public boolean purgeRemovedItems(RepositoryContentMetadata content)
Always returns false Request that the policy remove any RepositoryItemMetadata objects that are listed as removed if the policy no longer wishes to consider them in its decision making. Used to prevent perpetual growth in the size of the RepositoryContentMetadata by eventually purging records of removed items.

Specified by:
purgeRemovedItems in interface SynchronizationPolicy
Parameters:
content - the content. Cannot be null.
Returns:
false


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.