Page Summary
-
ExecutionOptions.Builder is a builder for creating a new ExecutionOptions object.
-
The builder allows setting a conflict resolution strategy for an action using setConflictStrategy.
-
You can set whether the client should be notified on completion of an action on the server using setNotifyOnCompletion.
-
A client-defined tracking tag can be set to be returned through a completion notification using setTrackingTag.
A builder for creating a new ExecutionOptions
.
Public Constructor Summary
Public Method Summary
| ExecutionOptions | build
()
|
| ExecutionOptions.Builder | |
| 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. |
Inherited Method Summary
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
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
DriveEventService
,
false otherwiseReturns
- 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
DriveEventService
.
Must not be null, and the length can never exceed MAX_TRACKING_TAG_STRING_LENGTH
Returns
- this builder

