Class AmazonEc2Reference

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, Releasable, RefCounted

    public class AmazonEc2Reference
    extends AbstractRefCounted
    implements Releasable
    Handles the shutdown of the wrapped AmazonEC2 using reference counting.
    • Method Detail

      • close

        public void close()
        Call when the client is not needed anymore.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface Releasable
      • client

        public com.amazonaws.services.ec2.AmazonEC2 client()
        Returns the underlying `AmazonEC2` client. All method calls are permitted BUT NOT shutdown. Shutdown is called when reference count reaches 0.