Package com.perforce.p4java.client
Class BaseProgressReport
- java.lang.Object
-
- com.perforce.p4java.client.BaseProgressReport
-
- All Implemented Interfaces:
IProgressReport
- Direct Known Subclasses:
ClientProgressReport
public abstract class BaseProgressReport extends java.lang.Object implements IProgressReport
Base implementation of IProgressReport with state tracking. Uses boolean flags instead of bitwise operations. Corresponds to ProgressReport class in C++.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringdescriptionprotected booleandescriptionChangedprotected booleanisNewProgressprotected longlastUpdateTimeprotected booleanneedFinalprotected longpositionprotected booleanpositionChangedprotected longtotalprotected booleantotalChangedprotected ProgressUnitunitsprotected booleanunitsChanged-
Fields inherited from interface com.perforce.p4java.client.IProgressReport
CPP_DONE, CPP_FAILDONE, CPP_FLUSH, CPP_NORMAL
-
-
Constructor Summary
Constructors Constructor Description BaseProgressReport()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidclearChangeFlags()protected voidconsiderReport(int flag)voiddescription(java.lang.String description)protected abstract voiddoReport(int flag)protected voidfinalize()java.lang.StringgetDescription()longgetPosition()longgetTotal()ProgressUnitgetUnits()voidincrement()voidincrement(long amount)voidincrement(long amount, int flag)voidposition(long position)voidposition(long position, int flag)voidtotal(long total)voidunits(ProgressUnit units)-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.perforce.p4java.client.IProgressReport
isComplete
-
-
-
-
Field Detail
-
descriptionChanged
protected boolean descriptionChanged
-
unitsChanged
protected boolean unitsChanged
-
totalChanged
protected boolean totalChanged
-
positionChanged
protected boolean positionChanged
-
isNewProgress
protected boolean isNewProgress
-
description
protected java.lang.String description
-
units
protected ProgressUnit units
-
total
protected long total
-
position
protected long position
-
needFinal
protected boolean needFinal
-
lastUpdateTime
protected long lastUpdateTime
-
-
Method Detail
-
description
public void description(java.lang.String description)
- Specified by:
descriptionin interfaceIProgressReport
-
units
public void units(ProgressUnit units)
- Specified by:
unitsin interfaceIProgressReport
-
total
public void total(long total)
- Specified by:
totalin interfaceIProgressReport
-
position
public void position(long position)
- Specified by:
positionin interfaceIProgressReport
-
position
public void position(long position, int flag)- Specified by:
positionin interfaceIProgressReport
-
increment
public void increment()
- Specified by:
incrementin interfaceIProgressReport
-
increment
public void increment(long amount)
- Specified by:
incrementin interfaceIProgressReport
-
increment
public void increment(long amount, int flag)- Specified by:
incrementin interfaceIProgressReport
-
getPosition
public long getPosition()
- Specified by:
getPositionin interfaceIProgressReport
-
getTotal
public long getTotal()
- Specified by:
getTotalin interfaceIProgressReport
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin interfaceIProgressReport
-
getUnits
public ProgressUnit getUnits()
- Specified by:
getUnitsin interfaceIProgressReport
-
considerReport
protected void considerReport(int flag)
-
clearChangeFlags
protected void clearChangeFlags()
-
doReport
protected abstract void doReport(int flag)
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
-