|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microsoft.tfs.core.clients.versioncontrol.UpdateLocalVersionQueue
public class UpdateLocalVersionQueue
Class for handling deferred batch updates of the (server's) LocalVersion table. Holds up to N requests for a maximum of M seconds. We use time rather than byte counts because it more closely models the user's maximum threshold of pain, if the operation were to be cancelled. In effect, it is the byte count adjusted for bandwidth.
You must call close()
when finished with an instance.
Constructor Summary | |
---|---|
UpdateLocalVersionQueue(Workspace workspace)
Constructs a queue for updating both the local workspace and server's local version tables. |
|
UpdateLocalVersionQueue(Workspace workspace,
UpdateLocalVersionQueueOptions options)
Constructs a queue for updating one or both (according to options) of the local workspace and server's local version tables. |
|
UpdateLocalVersionQueue(Workspace workspace,
UpdateLocalVersionQueueOptions options,
com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.WorkspaceLock wLock)
Constructs a queue for updating the workspace's local version table. |
|
UpdateLocalVersionQueue(Workspace workspace,
UpdateLocalVersionQueueOptions options,
com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.WorkspaceLock wLock,
int flushTriggerLevel,
int maximumLevel,
int timeTriggerInMilliseconds)
Constructs a queue for updating the workspace's local version table. |
Method Summary | |
---|---|
void |
close()
Send any pending requests to the server and close resources this instance is using. |
void |
flush()
Send any pending requests to the server |
void |
queueUpdate(ILocalVersionUpdate update)
Add the update to the queue, flushing if thresholds have been exceeded. |
void |
queueUpdate(java.lang.String sourceServerItem,
int itemId,
java.lang.String targetLocalItem,
int localVersion,
java.util.Calendar localVersionCheckinDate,
int encoding,
byte[] baselineHashValue,
long baselineFileLength,
PropertyValue[] properties)
Queue a request to tell the server the local disk location of an item in the workspace. |
void |
queueUpdate(java.lang.String sourceServerItem,
int itemId,
java.lang.String targetLocalItem,
int localVersion,
PropertyValue[] properties)
Queue a request to tell the server the local disk location of an item in the workspace. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UpdateLocalVersionQueue(Workspace workspace)
workspace
- the workspace that will be updated (must not be null
)public UpdateLocalVersionQueue(Workspace workspace, UpdateLocalVersionQueueOptions options)
workspace
- the workspace that will be updated (must not be null
)options
- options that control which version tables get updated (must not be
null
)public UpdateLocalVersionQueue(Workspace workspace, UpdateLocalVersionQueueOptions options, com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.WorkspaceLock wLock)
workspace
- Workspace to queue local version updates foroptions
- wLock
- Which table locations to update (local, server, or both)public UpdateLocalVersionQueue(Workspace workspace, UpdateLocalVersionQueueOptions options, com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.WorkspaceLock wLock, int flushTriggerLevel, int maximumLevel, int timeTriggerInMilliseconds)
GetEngine
to provide the workspace
lock which was opened for processGetOperations. (It may have been taken
on a different thread.)
workspace
- the workspace that will be updated (must not be null
)options
- options that control which version tables get updated (must not be
null
)wLock
- a WorkspaceLock
that this class should do its work inside
(if null
this class creates its own lock on demand)Method Detail |
---|
public void queueUpdate(java.lang.String sourceServerItem, int itemId, java.lang.String targetLocalItem, int localVersion, PropertyValue[] properties)
sourceServerItem
- The committed server path of the item in the workspace, or the
target server item if the item is uncommitted (pending add or
branch)itemId
- Item ID of the item in the workspace (optional; used for backwards
compatibility with TFS 2010 and earlier servers)targetLocalItem
- New local path of the item, or null to remove it from the
workspacelocalVersion
- The version of the item in the workspace. If zero, the request
refers to the uncommitted slot for the item ID. If non-zero, the
request refers to the committed slot for the item ID.public void queueUpdate(java.lang.String sourceServerItem, int itemId, java.lang.String targetLocalItem, int localVersion, java.util.Calendar localVersionCheckinDate, int encoding, byte[] baselineHashValue, long baselineFileLength, PropertyValue[] properties)
sourceServerItem
- The committed server path of the item in the workspace, or the
target server item if the item is uncommitted (pending add or
branch)itemId
- Item ID of the item in the workspace (optional; used for backwards
compatibility with TFS 2010 and earlier servers)targetLocalItem
- New local path of the item, or null to remove it from the
workspacelocalVersion
- The version of the item in the workspace. If zero, the request
refers to the uncommitted slot for the item ID. If non-zero, the
request refers to the committed slot for the item ID.public void queueUpdate(ILocalVersionUpdate update)
update
- the updatepublic void close()
close
in interface com.microsoft.tfs.util.Closable
public void flush()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |