Methods Summary |
---|
public void | clear()
if (syncAlreadyInProgress) {
throw new UnsupportedOperationException(
"you are not allowed to clear the ALREADY_IN_PROGRESS SyncStats");
}
tooManyDeletions = false;
tooManyRetries = false;
databaseError = false;
fullSyncRequested = false;
partialSyncUnavailable = false;
moreRecordsToGet = false;
stats.clear();
|
public int | describeContents()
return 0;
|
public boolean | hasError()
return hasSoftError() || hasHardError();
|
public boolean | hasHardError()
return stats.numParseExceptions > 0
|| stats.numConflictDetectedExceptions > 0
|| stats.numAuthExceptions > 0
|| tooManyDeletions
|| tooManyRetries
|| databaseError;
|
public boolean | hasSoftError()
return syncAlreadyInProgress || stats.numIoExceptions > 0;
|
public boolean | madeSomeProgress()
return ((stats.numDeletes > 0) && !tooManyDeletions)
|| stats.numInserts > 0
|| stats.numUpdates > 0;
|
public java.lang.String | toDebugString()Generates a debugging string indicating the status.
The string consist of a sequence of code letter followed by the count.
Code letters are f - fullSyncRequested, r - partialSyncUnavailable,
X - hardError, e - numParseExceptions, c - numConflictDetectedExceptions,
a - numAuthExceptions, D - tooManyDeletions, R - tooManyRetries,
b - databaseError, x - softError, l - syncAlreadyInProgress,
I - numIoExceptions
StringBuffer sb = new StringBuffer();
if (fullSyncRequested) {
sb.append("f1");
}
if (partialSyncUnavailable) {
sb.append("r1");
}
if (hasHardError()) {
sb.append("X1");
}
if (stats.numParseExceptions > 0) {
sb.append("e").append(stats.numParseExceptions);
}
if (stats.numConflictDetectedExceptions > 0) {
sb.append("c").append(stats.numConflictDetectedExceptions);
}
if (stats.numAuthExceptions > 0) {
sb.append("a").append(stats.numAuthExceptions);
}
if (tooManyDeletions) {
sb.append("D1");
}
if (tooManyRetries) {
sb.append("R1");
}
if (databaseError) {
sb.append("b1");
}
if (hasSoftError()) {
sb.append("x1");
}
if (syncAlreadyInProgress) {
sb.append("l1");
}
if (stats.numIoExceptions > 0) {
sb.append("I").append(stats.numIoExceptions);
}
return sb.toString();
|
public java.lang.String | toString()
StringBuilder sb = new StringBuilder();
sb.append(" syncAlreadyInProgress: ").append(syncAlreadyInProgress);
sb.append(" tooManyDeletions: ").append(tooManyDeletions);
sb.append(" tooManyRetries: ").append(tooManyRetries);
sb.append(" databaseError: ").append(databaseError);
sb.append(" fullSyncRequested: ").append(fullSyncRequested);
sb.append(" partialSyncUnavailable: ").append(partialSyncUnavailable);
sb.append(" moreRecordsToGet: ").append(moreRecordsToGet);
sb.append(" stats: ").append(stats);
return sb.toString();
|
public void | writeToParcel(android.os.Parcel parcel, int flags)
parcel.writeInt(syncAlreadyInProgress ? 1 : 0);
parcel.writeInt(tooManyDeletions ? 1 : 0);
parcel.writeInt(tooManyRetries ? 1 : 0);
parcel.writeInt(databaseError ? 1 : 0);
parcel.writeInt(fullSyncRequested ? 1 : 0);
parcel.writeInt(partialSyncUnavailable ? 1 : 0);
parcel.writeInt(moreRecordsToGet ? 1 : 0);
stats.writeToParcel(parcel, flags);
|