Class RemoteStorageHelper (2.22.3)

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.

Inheritance

java.lang.Object > RemoteStorageHelper

Static Methods

cleanBuckets(Storage storage, long olderThan, long timeoutMs)

public static void cleanBuckets(Storage storage, long olderThan, long timeoutMs)
Parameters
NameDescription
storageStorage
olderThanlong
timeoutMslong

create()

public static RemoteStorageHelper create()

Creates a RemoteStorageHelper object using default project id and authentication credentials.

Returns
TypeDescription
RemoteStorageHelper
Exceptions
TypeDescription
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.