public interface ISynchronizer
IWorkspace.getSynchronizer()
Modifier and Type | Method and Description |
---|---|
void |
accept(QualifiedName partner,
IResource start,
IResourceVisitor visitor,
int depth)
Visits the given resource and its descendents with the specified visitor
if sync information for the given sync partner is found on the resource.
|
void |
add(QualifiedName partner)
Adds the named synchronization partner to this synchronizer's
registry of partners.
|
void |
flushSyncInfo(QualifiedName partner,
IResource resource,
int depth)
Discards the named partner's synchronization information
associated with the specified resource and its descendents to the
specified depth.
|
QualifiedName[] |
getPartners()
Returns a list of synchronization partner names currently registered
with this synchronizer.
|
byte[] |
getSyncInfo(QualifiedName partner,
IResource resource)
Returns the named sync partner's synchronization information for the given resource.
|
void |
remove(QualifiedName partner)
Removes the named synchronization partner from this synchronizer's
registry.
|
void |
setSyncInfo(QualifiedName partner,
IResource resource,
byte[] info)
Sets the named sync partner's synchronization information for the given resource.
|
void accept(QualifiedName partner, IResource start, IResourceVisitor visitor, int depth) throws CoreException
partner
- the sync partner namestart
- the parent resource to start the visitationvisitor
- the visitor to use when visiting the resourcesdepth
- the depth to which members of this resource should be
visited. One of IResource.DEPTH_ZERO
, IResource.DEPTH_ONE
,
or IResource.DEPTH_INFINITE
.CoreException
- if this operation fails. Reasons include:
IResourceStatus.PARTNER_NOT_REGISTERED
The sync partner is not registered.void add(QualifiedName partner)
partner
- the partner name to registerremove(QualifiedName)
void flushSyncInfo(QualifiedName partner, IResource resource, int depth) throws CoreException
partner
- the sync partner nameresource
- the resourcedepth
- the depth to which members of this resource should be
visited. One of IResource.DEPTH_ZERO
, IResource.DEPTH_ONE
,
or IResource.DEPTH_INFINITE
.CoreException
- if this operation fails. Reasons include:
IResourceStatus.PARTNER_NOT_REGISTERED
The sync partner is not registered.QualifiedName[] getPartners()
byte[] getSyncInfo(QualifiedName partner, IResource resource) throws CoreException
null
if no information is found.partner
- the sync partner nameresource
- the resourcenull
if noneCoreException
- if this operation fails. Reasons include:
IResourceStatus.PARTNER_NOT_REGISTERED
The sync partner is not registered.void remove(QualifiedName partner)
partner
- the partner name to remove from the registryadd(QualifiedName)
void setSyncInfo(QualifiedName partner, IResource resource, byte[] info) throws CoreException
null
and the resource neither exists
nor is a phantom, this method creates a phantom resource to hang on to the info.
If the given info is null
, any sync info for the resource stored by the
given sync partner is discarded; in some cases, this may result in the deletion
of a phantom resource if there is no more sync info to maintain for that resource.
Sync information is not stored on the workspace root. Attempts to set information on the root will be ignored.
partner
- the sync partner nameresource
- the resourceinfo
- the synchronization information, or null
CoreException
- if this operation fails. Reasons include:
IResourceStatus.PARTNER_NOT_REGISTERED
The sync partner is not registered.
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.