com.starteam
Class CheckoutManager.Progress

java.lang.Object
  extended by com.starteam.CheckoutManager.Progress
Enclosing class:
CheckoutManager

public static final class CheckoutManager.Progress
extends java.lang.Object

Information on the progress of a checkout operation from CheckoutManager. This provides a snapshot of the progress at the time of request. The values in this class do not change again once the class is created. To retrieve the current progress, use CheckoutManager.getProgress().

See Also:
CheckoutManager, CheckoutManager.getProgress()

Nested Class Summary
static class CheckoutManager.Progress.Phase
          Information on the phase of a checkout progress of the Checkout operation from CheckoutManager.
static class CheckoutManager.Progress.Statistics
          A Statistical summary that tracks the progress of the checkout
 
Method Summary
 java.lang.Object clone()
          Return a snapshot of this Progress object.
 int[] getCheckoutThreadIndices()
          Returns the an array of all thread indices used for checkout This includes cache agent threads, if any, and the thread on which server based checkout may occur.
 File getCurrentFile(int threadIndex)
          Get the current StarTeam Item object that is being processed in the current phase.
 CheckoutManager.Progress.Phase getCurrentPhase()
          Return the Phase associated with this Progress.
 long getCurrentPhaseEstimatedTimeRemaining()
          Return the estimated time remaining in milliseconds.
 long getCurrentPhaseUnitsOfWork()
          Get the total number of units of work.
 long getCurrentPhaseUnitsOfWorkProcessed()
          Return the number of units of work that has been processed in this phase.
 long getCurrentPhaseUnitsOfWorkRemaining()
          Get the total number of units of work that are yet to be done.
 java.io.File getCurrentWorkingFile()
          Get the current File object that's being checked in.
 java.lang.String getDescription()
          Return a description of the current state of Progress.
 java.lang.Throwable getLastError()
          Get the last error, if any, that occurred during the last checkout operation.
 DateTime getSnapshotTime()
          Return the snapshot time that is set when the last clone was created.
 CheckoutManager.Progress.Statistics getStatisticsByThread(int threadIndex)
          // ------------------------------------------------------------------ ------- // Any of the following methods that returns a Statistics object may return null if // the current phase does not support Statistics.
 CheckoutManager.Progress.Statistics getStatisticsForCacheAgentCheckout()
          returns aggregated statistics for all Cache Agent Threads.
 CheckoutManager.Progress.Statistics getStatisticsForStarTeamServerCheckout()
          returns statistics for the one & only non-cache agent thread.
 CheckoutManager.Progress.Statistics getSummaryStatistics()
          returns aggregated statistics across all threads.
 long getTotalFilesForCheckout()
          Get the total number of files for checkout.
 long getTotalTimeSpent()
          Get the total time spent so far (in milliseconds).
 java.lang.String toString()
          returns a String representation of the Progress instance now; useful for debugging
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getTotalFilesForCheckout

public long getTotalFilesForCheckout()
Get the total number of files for checkout. The total number of files for checkout is a constant for this instance of the progress object.

Returns:
the total number of files for checkout.

getTotalTimeSpent

public long getTotalTimeSpent()
Get the total time spent so far (in milliseconds).

Returns:
the total time spent so far (in milliseconds).

getCurrentPhaseUnitsOfWork

public long getCurrentPhaseUnitsOfWork()
Get the total number of units of work.

Returns:
the total number of units of work.

getCurrentPhaseUnitsOfWorkRemaining

public long getCurrentPhaseUnitsOfWorkRemaining()
Get the total number of units of work that are yet to be done.

Returns:
the total number of units of work that are yet to be done.

getLastError

public java.lang.Throwable getLastError()
Get the last error, if any, that occurred during the last checkout operation.

Returns:
the last error that occurred.

getCurrentPhase

public CheckoutManager.Progress.Phase getCurrentPhase()
Return the Phase associated with this Progress.

Returns:
the Phase associated with this Progress.

getCurrentPhaseUnitsOfWorkProcessed

public long getCurrentPhaseUnitsOfWorkProcessed()
Return the number of units of work that has been processed in this phase.

Returns:
the number of units of work that has been processed in this phase.

getCurrentPhaseEstimatedTimeRemaining

public long getCurrentPhaseEstimatedTimeRemaining()
Return the estimated time remaining in milliseconds.

Returns:
the estimated time remaining in milliseconds.

getDescription

public java.lang.String getDescription()
Return a description of the current state of Progress. It's a string concatenating the name of the Checkout Phase and the File Name.

Returns:
a description of the current state of Progress

getCurrentWorkingFile

public java.io.File getCurrentWorkingFile()
Get the current File object that's being checked in. The return value may be the actual File, or a null if the phase is not a file-processing phase.

Returns:
the current File object that's being checked in in the specified thread ID.

getCurrentFile

public File getCurrentFile(int threadIndex)
Get the current StarTeam Item object that is being processed in the current phase. The return value may be an Item if the current phase is iterating over items. Otherwise, a null is returned. For the most part, these Item's are File Objects. However, there can be phases in which other Items are returned, for instance Process Items during a link phase

Parameters:
threadIndex - the thread on which this file is being checked out
Returns:
Return the current StarTeam Item that's being processed in the current phase.

getStatisticsByThread

public CheckoutManager.Progress.Statistics getStatisticsByThread(int threadIndex)
// ------------------------------------------------------------------ ------- // Any of the following methods that returns a Statistics object may return null if // the current phase does not support Statistics. However, once a non-null / // Statistics object instance is returned by any of these methods, then the same // instance must be guaranteed to be returned across the rest of the life of the // Progress object instance. // Return the statistics per thread, where the thread index was in the array returned // by getCheckoutThreadIndices().

Parameters:
threadIndex - the thread used for the checkout
Returns:
the Statistics for that thread

getStatisticsForCacheAgentCheckout

public CheckoutManager.Progress.Statistics getStatisticsForCacheAgentCheckout()
returns aggregated statistics for all Cache Agent Threads.

Returns:
aggregated statistics across all Cache Agent Threads.

getStatisticsForStarTeamServerCheckout

public CheckoutManager.Progress.Statistics getStatisticsForStarTeamServerCheckout()
returns statistics for the one & only non-cache agent thread.

Returns:
statistics for the one & only non-cache agent thread.

getSummaryStatistics

public CheckoutManager.Progress.Statistics getSummaryStatistics()
returns aggregated statistics across all threads.

Returns:
aggregated statistics across all threads.

getCheckoutThreadIndices

public int[] getCheckoutThreadIndices()
Returns the an array of all thread indices used for checkout This includes cache agent threads, if any, and the thread on which server based checkout may occur.

Returns:
an array of thread indices used by the checkout process

clone

public java.lang.Object clone()
Return a snapshot of this Progress object.

Overrides:
clone in class java.lang.Object
Returns:
Object

getSnapshotTime

public DateTime getSnapshotTime()
Return the snapshot time that is set when the last clone was created.

Returns:
DateTime the snapshot time that is set when the last clone was created.

toString

public java.lang.String toString()
returns a String representation of the Progress instance now; useful for debugging

Overrides:
toString in class java.lang.Object
Returns:
String a String representation of the Progress instance now


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.