public abstract class ThreeWaySubscriber extends ResourceVariantTreeSubscriber implements ISynchronizerChangeListener
ThreeWaySycnrhonizer to store and manage the
synchronization state for the local workspace. Subclasses need to
provide a subclass of ThreeWayRemoteTree and a method
to create resource variant handles from the bytes cached in the
ThreeWaySynchronizer.ThreeWaySynchronizer,
ThreeWayRemoteTree,
CachedResourceVariant| Modifier | Constructor and Description |
|---|---|
protected |
ThreeWaySubscriber(ThreeWaySynchronizer synchronizer)
Create a three-way subscriber that uses the given synchronizer
to manage the synchronization state of local resources
and their variants
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract ThreeWayRemoteTree |
createRemoteTree()
Create the three-way remote tree which provides access to the
remote bytes in the three-way synchronizer.
|
protected IResourceVariantTree |
getBaseTree()
Return the base resource variant tree.
|
protected IResourceVariantTree |
getRemoteTree()
Return the remote resource variant tree.
|
IResourceVariantComparator |
getResourceComparator()
Returns the comparison criteria that will be used by the sync info
created by this subscriber.
|
abstract IResourceVariant |
getResourceVariant(IResource resource,
byte[] bytes)
Create the resource variant for the given local resource from the
given bytes.
|
ThreeWaySynchronizer |
getSynchronizer()
Return the three-way synchronizer of this subscriber.
|
protected void |
handleRootChanged(IResource resource,
boolean added)
Convenience method that can be used by subclasses to notify listeners
when a root is added or removed from the subscriber.
|
boolean |
isSupervised(IResource resource)
Returns
false for resources that are not children
of a subscriber root, are ignored by the subscriber's synchronizer
or are ignored by the Team.ignoreHist(IResource). |
void |
syncStateChanged(IResource[] resources)
Notification of synchronization state changes for the given resources.
|
getSyncInfo, getSyncInfo, members, refreshaccept, accept, addListener, collectOutOfSync, fireTeamResourceChange, getDiff, getName, getState, refresh, removeListener, rootsprotected ThreeWaySubscriber(ThreeWaySynchronizer synchronizer)
synchronizer - the three-way synchronizer for this subscriberprotected final IResourceVariantTree getBaseTree()
ResourceVariantTreeSubscribergetBaseTree in class ResourceVariantTreeSubscriberprotected final IResourceVariantTree getRemoteTree()
ResourceVariantTreeSubscribergetRemoteTree in class ResourceVariantTreeSubscriberpublic final IResourceVariantComparator getResourceComparator()
SubscribergetResourceComparator in class Subscriberpublic void syncStateChanged(IResource[] resources)
ISynchronizerChangeListenerThreeWaySynchronizer that generated
this event to determine the new synchronization state.syncStateChanged in interface ISynchronizerChangeListenerresources - the resources whose synchronization state has changedpublic boolean isSupervised(IResource resource) throws TeamException
false for resources that are not children
of a subscriber root, are ignored by the subscriber's synchronizer
or are ignored by the Team.ignoreHist(IResource). Returns
true otherwise.isSupervised in class Subscribertrue if this resource is supervised, and false
otherwiseTeamExceptionSubscriber.isSupervised(IResource)public ThreeWaySynchronizer getSynchronizer()
public abstract IResourceVariant getResourceVariant(IResource resource, byte[] bytes) throws TeamException
IResourceVariant#asBytes().resource - the local resourcebytes - the bytes that identify a variant of the resourceTeamExceptionprotected abstract ThreeWayRemoteTree createRemoteTree()
protected void handleRootChanged(IResource resource, boolean added)
true if the root was added and false
if it was removed.resource - the added or removed rootadded - true if the root was added and false
if it was removed.Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.