Skip to content

[enhancement request] make retryer and sleeper more flexible #121

@yanshenxian

Description

@yanshenxian

sdk version: 4.0.0

B2StorageClient client = B2StorageClientFactory
             .createDefaultFactory()
             .create(APP_KEY_ID, APP_KEY, USER_AGENT);

The default B2RetryPolicy wil try max 8 attempts and each time wil sleep at least 1 second.

Because hard code sleeper.sleepSeconds(waitSeconds) written at com.backblaze.b2.client.B2Retryer#doRetry(java.lang.String, com.backblaze.b2.client.B2AccountAuthorizationCache, com.backblaze.b2.client.B2Retryer.RetryableCallable<T>, com.backblaze.b2.client.B2RetryPolicy)

And these classes (and some parameter classes) are package accessed.

It's not easy to change the retry behavior... 😢

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions