Package com.jcabi.s3.cached
Class CdBucket
- java.lang.Object
-
- com.jcabi.s3.cached.CdBucket
-
- All Implemented Interfaces:
Bucket,Comparable<Bucket>
@Immutable @Loggable(1) public final class CdBucket extends Object implements Bucket
Cached bucket.- Since:
- 0.8
- Version:
- $Id: 591264665080df8af17b0a9fc32f60647e55dd22 $
- 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 bucket)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
-
CdBucket
public CdBucket(Bucket bkt)
Public ctor.- Parameters:
bkt- Bucket original
-
-
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
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
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 bucket)
- Specified by:
compareToin interfaceComparable<Bucket>
-
-