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
  • Constructor Details

    • ReBucket

      public ReBucket(Bucket bkt)
      Public ctor.
      Parameters:
      bkt - Bucket we're in
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • region

      public Region region()
      Description copied from interface: Bucket
      Get region we're in.
      Specified by:
      region in interface Bucket
      Returns:
      Region
    • name

      public String name()
      Description copied from interface: Bucket
      Get bucket name.
      Specified by:
      name in interface Bucket
      Returns:
      Bucket name
    • ocket

      public Ocket ocket(String key)
      Description copied from interface: Bucket
      Get object.
      Specified by:
      ocket in interface Bucket
      Parameters:
      key - Name of it in the bucket
      Returns:
      Ocket
    • exists

      public boolean exists() throws IOException
      Description copied from interface: Bucket
      Checks if the bucket exists.
      Specified by:
      exists in interface Bucket
      Returns:
      If the bucket exists true, otherwise false
      Throws:
      IOException - If any failure happens
    • remove

      @RetryOnFailure(verbose=false) public void remove(String key) throws IOException
      Description copied from interface: Bucket
      Delete object from bucket.
      Specified by:
      remove in interface Bucket
      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: Bucket
      List object names with a given prefix.
      Specified by:
      list in interface Bucket
      Parameters:
      pfx - Prefix to use
      Returns:
      Iterable of names
      Throws:
      IOException - If fails
    • compareTo

      public int compareTo(Bucket bkt)
      Specified by:
      compareTo in interface Comparable<Bucket>