com.google.cloud.compute.ComputeOptions

Here are the examples of the java api class com.google.cloud.compute.ComputeOptions taken from open source projects.

1. RemoteComputeHelperTest#testCreateFromStream()

View license
@Test
public void testCreateFromStream() {
    RemoteComputeHelper helper = RemoteComputeHelper.create(PROJECT_ID, JSON_KEY_STREAM);
    ComputeOptions options = helper.options();
    assertEquals(PROJECT_ID, options.projectId());
    assertEquals(60000, options.connectTimeout());
    assertEquals(60000, options.readTimeout());
    assertEquals(10, options.retryParams().retryMaxAttempts());
    assertEquals(6, options.retryParams().retryMinAttempts());
    assertEquals(30000, options.retryParams().maxRetryDelayMillis());
    assertEquals(120000, options.retryParams().totalRetryPeriodMillis());
    assertEquals(250, options.retryParams().initialRetryDelayMillis());
}

2. RemoteComputeHelper#create()

View license
/**
   * Creates a {@code RemoteComputeHelper} object using default project id and authentication
   * credentials.
   */
public static RemoteComputeHelper create() {
    ComputeOptions computeOptions = ComputeOptions.builder().retryParams(retryParams()).connectTimeout(60000).readTimeout(60000).build();
    return new RemoteComputeHelper(computeOptions);
}