ExecutionOptions.Builder

public static class ExecutionOptions.Builder extends Object

A builder for creating a new ExecutionOptions.

Public Constructor Summary

Public Method Summary

ExecutionOptions
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.

Inherited Method Summary

Object
clone()
boolean
equals(Object arg0)
void
finalize()
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()

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.

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