public class CloudStorageRetryHandler extends Object
Constructor and Description |
---|
CloudStorageRetryHandler(int maxRetriesAndReopens)
Create a CloudStorageRetryHandler with the maximum retries and reopens set to the same value.
|
CloudStorageRetryHandler(int maxRetries,
int maxReopens)
Create a CloudStorageRetryHandler with the maximum retries and reopens set to different values.
|
Modifier and Type | Method and Description |
---|---|
boolean |
handleStorageException(StorageException exs)
Checks whether we should retry, reopen, or give up.
|
int |
reopens() |
int |
retries() |
public CloudStorageRetryHandler(int maxRetriesAndReopens)
maxRetriesAndReopens
- value for both maxRetries and maxReopenspublic CloudStorageRetryHandler(int maxRetries, int maxReopens)
maxRetries
- maximum number of retriesmaxReopens
- maximum number of reopenspublic int retries()
public int reopens()
public boolean handleStorageException(StorageException exs) throws StorageException
exs
- caught StorageExceptionStorageException
- if the exception is not retryable, or if you ran out of retries.Copyright © 2017 Google. All rights reserved.