Class DefaultProgressData
- java.lang.Object
-
- com.hybris.backoffice.widgets.processes.DefaultProgressData
-
- All Implemented Interfaces:
ProgressData
public class DefaultProgressData extends java.lang.Object implements ProgressData
-
-
Field Summary
Fields Modifier and Type Field Description protected static intINITIAL_MAX_PERCENTAGEprotected static longINITIAL_SPEEDprotected static intMAX_PERCENTAGE
-
Constructor Summary
Constructors Constructor Description DefaultProgressData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcalculateEstimatedCurrentPercentage(int realPercentage, long elapsedTime)protected longcalculateTimeToIncreaseOnePercent(long elapsedTime, int realPercentage, int estimatedCurrentPercentage)intgetEstimatedCurrentPercentage()intgetMaxPercentage()protected intgetOptimizedEstimatedCurrentPercentage(int realPercentage, int estimatedCurrentPercentage)longgetTimeToIncreaseOnePercent()protected booleanprogressShouldBeMocked(int realPercentage, int estimatedCurrentPercentage)protected voidreplacePreviousUpdateWithNewOne(com.hybris.backoffice.widgets.processes.ProgressPick progressPick)voidupdateProgress(CronJobHistoryModel cronJobHistoryModel, java.util.Date currentTime)
-
-
-
Field Detail
-
INITIAL_SPEED
protected static final long INITIAL_SPEED
- See Also:
- Constant Field Values
-
INITIAL_MAX_PERCENTAGE
protected static final int INITIAL_MAX_PERCENTAGE
- See Also:
- Constant Field Values
-
MAX_PERCENTAGE
protected static final int MAX_PERCENTAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
updateProgress
public void updateProgress(CronJobHistoryModel cronJobHistoryModel, java.util.Date currentTime)
- Specified by:
updateProgressin interfaceProgressData
-
calculateEstimatedCurrentPercentage
protected int calculateEstimatedCurrentPercentage(int realPercentage, long elapsedTime)
-
getOptimizedEstimatedCurrentPercentage
protected int getOptimizedEstimatedCurrentPercentage(int realPercentage, int estimatedCurrentPercentage)
-
calculateTimeToIncreaseOnePercent
protected long calculateTimeToIncreaseOnePercent(long elapsedTime, int realPercentage, int estimatedCurrentPercentage)
-
progressShouldBeMocked
protected boolean progressShouldBeMocked(int realPercentage, int estimatedCurrentPercentage)
-
replacePreviousUpdateWithNewOne
protected void replacePreviousUpdateWithNewOne(com.hybris.backoffice.widgets.processes.ProgressPick progressPick)
-
getEstimatedCurrentPercentage
public int getEstimatedCurrentPercentage()
- Specified by:
getEstimatedCurrentPercentagein interfaceProgressData
-
getMaxPercentage
public int getMaxPercentage()
- Specified by:
getMaxPercentagein interfaceProgressData
-
getTimeToIncreaseOnePercent
public long getTimeToIncreaseOnePercent()
- Specified by:
getTimeToIncreaseOnePercentin interfaceProgressData
-
-