Package com.dropbox.core.v1
Class DbxDelta<MD extends Dumpable>
- java.lang.Object
-
- com.dropbox.core.util.Dumpable
-
- com.dropbox.core.v1.DbxDelta<MD>
-
- Type Parameters:
MD- The type of metadata being returned in the delta results. For example, in theDbxClientV1.getDelta(java.lang.String, boolean), this has typeDbxEntry.
public final class DbxDelta<MD extends Dumpable> extends Dumpable
Represents a single "page" of results from a delta-style API call.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDbxDelta.Entry<MD extends Dumpable>A single "delta entry" in aDbxDeltapage.static classDbxDelta.Reader<MD extends Dumpable>For JSON parsing.
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringcursorA string that is used by the server to keep track of which entries have already been returned to you.java.util.List<DbxDelta.Entry<MD>>entriesApply these entries to your local state to catch up with the Dropbox server's state.booleanhasMoreIftrue, then there are more entries available.booleanresetIftrue, then you should reset your local state to be an empty folder before processing the list of delta entries.
-
Constructor Summary
Constructors Constructor Description DbxDelta(boolean reset, java.util.List<DbxDelta.Entry<MD>> entries, java.lang.String cursor, boolean hasMore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddumpFields(DumpWriter out)-
Methods inherited from class com.dropbox.core.util.Dumpable
getTypeName, toString, toString, toStringMultiline, toStringMultiline
-
-
-
-
Field Detail
-
reset
public final boolean reset
Iftrue, then you should reset your local state to be an empty folder before processing the list of delta entries.This is always
truefor the first delta result, but for subsequent results it is true only intruerare situations. For example, if Dropbox changes their cursor format, or if a user asks Dropbox to completely reset his/her account, then the next time you call a delta API it may send down a reset and start you from scratch.
-
entries
public final java.util.List<DbxDelta.Entry<MD extends Dumpable>> entries
Apply these entries to your local state to catch up with the Dropbox server's state.
-
cursor
public final java.lang.String cursor
A string that is used by the server to keep track of which entries have already been returned to you. This is what you pass in to the next API call to continue where you left off.This cursor is valid for a long time. You'd typically store this somewhere persistent (such as a database) so you can resume continue you left off.
-
hasMore
public final boolean hasMore
Iftrue, then there are more entries available. You can retrieve them immediately by making the call again (passing incursor). Iffalse, then wait at least 5 minutes before checking again.
-
-
Method Detail
-
dumpFields
protected void dumpFields(DumpWriter out)
- Specified by:
dumpFieldsin classDumpable
-
-