ExecutionOptions.Builder | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Analyze
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Ctors | Methods | Inherited Methods | [Expand All]
public static final class

# ExecutionOptions.Builder

extends Object

java.lang.Object
↳ | com.google.android.gms.drive.ExecutionOptions.Builder

## Class Overview

A builder for creating a new `ExecutionOptions`.

## Summary

Public Constructors
| ExecutionOptions.Builder()

Public Methods
ExecutionOptions | build()
ExecutionOptions.Builder | setConflictStrategy(int strategy) Sets a conflict resolution strategy for this action.
ExecutionOptions.Builder | setNotifyOnCompletion(boolean notify) Sets whether the client should be notified when the action associated with these `ExecutionOptions` is applied on the server.
ExecutionOptions.Builder | setTrackingTag(String trackingTag) Sets a client-defined string that will be returned to the client through a completion notification on `DriveEventService` after this particular action either succeeds or fails when applied on the server.

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## Public Constructors

#### public ExecutionOptions.Builder ()

## Public Methods

#### public ExecutionOptions build ()

#### public ExecutionOptions.Builder setConflictStrategy (int strategy)

Sets a conflict resolution strategy for this action.

The resulting behavior depends on the strategy selected. Check documentation on accepted values (`CONFLICT_STRATEGY_OVERWRITE_REMOTE` and `CONFLICT_STRATEGY_KEEP_REMOTE`) for more details.

##### Parameters

strategy | one of `CONFLICT_STRATEGY_OVERWRITE_REMOTE` and `CONFLICT_STRATEGY_KEEP_REMOTE`

##### Returns

- this builder

#### public ExecutionOptions.Builder setNotifyOnCompletion (boolean notify)

Sets whether the client should be notified when the action associated with these `ExecutionOptions` is applied on the server.

When clients set `notify` to true, they must also implement a `DriveEventService` to receive the completion event. See `DriveEventService` for more details on how the service should be implemented and added to the manifest.

##### Parameters

notify | true if the API should deliver notifications about the completion of this event to the client's `DriveEventService`, false otherwise

##### Returns

- this builder

#### public ExecutionOptions.Builder setTrackingTag (String trackingTag)

Sets a client-defined string that will be returned to the client through a completion notification on `DriveEventService` after this particular action either succeeds or fails when applied on the server. A notification will only be delivered if `setNotifyOnCompletion(boolean)` is called. This tag may contain any information that will be helpful to the caller in the event of a conflict or a failure to apply an action on the server, for example,a commit identifier or a delta representing the changes made in the commit.

##### Parameters

trackingTag | the tag that will be returned when a completion event is delivered through `DriveEventService`. Must not be null, and the length can never exceed `MAX_TRACKING_TAG_STRING_LENGTH`

##### Returns

- this builder object