public class RemoteStorageHelper
Utility to create a remote storage configuration for testing. Storage options can be obtained via
the #getOptions() ()} method. Returned options have custom StorageOptions#getRetrySettings(): RetrySettings#getMaxAttempts() is 10
, RetrySettings#getMaxRetryDelay() is 30000
, RetrySettings#getTotalTimeout() is
120000
and RetrySettings#getInitialRetryDelay() is 250
. HttpTransportOptions#getConnectTimeout() and HttpTransportOptions#getReadTimeout() are
both set to 60000
.
Static Methods
cleanBuckets(Storage storage, long olderThan, long timeoutMs)
public static void cleanBuckets(Storage storage, long olderThan, long timeoutMs)
Parameters | |
---|---|
Name | Description |
storage | Storage |
olderThan | long |
timeoutMs | long |
create()
public static RemoteStorageHelper create()
Creates a RemoteStorageHelper
object using default project id and authentication
credentials.
Returns | |
---|---|
Type | Description |
RemoteStorageHelper |
Exceptions | |
---|---|
Type | Description |
RemoteStorageHelper.StorageHelperException |
create(String projectId, InputStream keyStream)
public static RemoteStorageHelper create(String projectId, InputStream keyStream)
Creates a RemoteStorageHelper
object for the given project id and JSON key input
stream.