Package com.jcabi.s3.retry
Class ReBucket
- java.lang.Object
-
- com.jcabi.s3.retry.ReBucket
-
- All Implemented Interfaces:
Bucket,Comparable<Bucket>
@Immutable @Loggable(1) public final class ReBucket extends Object implements Bucket
Region that retries a few times before giving up.- Since:
- 0.5
- Version:
- $Id: b7648983f6497fc2a0d1057817e0eba319c8b623 $
- Author:
- Yegor Bugayenko (yegor256@gmail.com)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jcabi.s3.Bucket
Bucket.Prefixed
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Bucket bkt)booleanexists()Checks if the bucket exists.Iterable<String>list(String pfx)List object names with a given prefix.Stringname()Get bucket name.Ocketocket(String key)Get object.Regionregion()Get region we're in.voidremove(String key)Delete object from bucket.StringtoString()
-
-
-
Constructor Detail
-
ReBucket
public ReBucket(Bucket bkt)
Public ctor.- Parameters:
bkt- Bucket we're in
-
-
Method Detail
-
exists
public boolean exists() throws IOExceptionDescription copied from interface:BucketChecks if the bucket exists.- Specified by:
existsin interfaceBucket- Returns:
- If the bucket exists
true, otherwisefalse - Throws:
IOException- If any failure happens
-
remove
@RetryOnFailure(verbose=false) public void remove(String key) throws IOException
Description copied from interface:BucketDelete object from bucket.- Specified by:
removein interfaceBucket- Parameters:
key- Name of it in the bucket- Throws:
IOException- If not found or any other failure
-
list
@RetryOnFailure(verbose=false) public Iterable<String> list(String pfx) throws IOException
Description copied from interface:BucketList object names with a given prefix.- Specified by:
listin interfaceBucket- Parameters:
pfx- Prefix to use- Returns:
- Iterable of names
- Throws:
IOException- If fails
-
compareTo
public int compareTo(Bucket bkt)
- Specified by:
compareToin interfaceComparable<Bucket>
-
-