Google is committed to advancing racial equity for Black communities. See how.

ExecutionOptions

public class ExecutionOptions extends Object

Options that can be included with certain requests to the API to configure notification and conflict resolution behavior. Use ExecutionOptions.Builder to create a new ExecutionOptions object.

Nested Class Summary

class ExecutionOptions.Builder A builder for creating a new ExecutionOptions

Constant Summary

int CONFLICT_STRATEGY_KEEP_REMOTE A conflict resolution strategy that keeps the remote version of the file instead of overwriting it with the locally committed changes when a conflict is detected.
int CONFLICT_STRATEGY_OVERWRITE_REMOTE A conflict resolution strategy that always overwrites any remote state and applies the locally committed changes on top, even in case of conflicts.
int MAX_TRACKING_TAG_STRING_LENGTH The maximum tracking tag size in string length.

Public Method Summary

boolean
int

Inherited Method Summary

Constants

public static final int CONFLICT_STRATEGY_KEEP_REMOTE

A conflict resolution strategy that keeps the remote version of the file instead of overwriting it with the locally committed changes when a conflict is detected.

When using this strategy, the caller must also request completion notifications, by calling setNotifyOnCompletion(boolean). Then, in case of conflict the remote state of the file will be preserved but through the CompletionEvent, the client will be able to handle the conflict, access the locally committed changes that conflicted (and couldn't be persisted on the server), and perform the desired conflict resolution with all the data. See STATUS_CONFLICT for more information on how to resolve conflicts.

This strategy can be used with DriveContents that were either opened in MODE_READ_WRITE through openFile(DriveFile, int), or reopened in MODE_WRITE_ONLY but obtained through reopenContentsForWrite(DriveContents). This is because the API can only detect conflicts if the written contents are based upon a known revision. In both cases the base revision is considered the one obtained through the first openFile(DriveFile, int).

Constant Value: 1

public static final int CONFLICT_STRATEGY_OVERWRITE_REMOTE

A conflict resolution strategy that always overwrites any remote state and applies the locally committed changes on top, even in case of conflicts.

When this strategy is used, the Drive API will not even attempt to detect conflicts and will always overwrite contents. This strategy can be used with DriveContents opened in any mode (MODE_READ_ONLY, MODE_WRITE_ONLY or MODE_READ_WRITE).

Constant Value: 0

public static final int MAX_TRACKING_TAG_STRING_LENGTH

The maximum tracking tag size in string length.

Constant Value: 65536

Public Methods

public boolean equals (Object o)

public int hashCode ()