Example usage for com.amazonaws.services.cloudwatch AmazonCloudWatchAsyncClient shutdown

List of usage examples for com.amazonaws.services.cloudwatch AmazonCloudWatchAsyncClient shutdown

Introduction

In this page you can find the example usage for com.amazonaws.services.cloudwatch AmazonCloudWatchAsyncClient shutdown.

Prototype

@Override
public void shutdown() 

Source Link

Document

Shuts down the client, releasing all managed resources.

Usage

From source file:com.vmware.photon.controller.model.adapters.awsadapter.AWSUtils.java

License:Open Source License

/**
 * Releases all the resources allocated for the use of the AWS CloudWatchAsync client.
 *//*  w w  w  .  j  a  v a 2 s . c  om*/
public static void cleanupCloudWatchClientResources(AmazonCloudWatchAsyncClient client) {
    if (client != null) {
        client.shutdown();
        // To ensure that no requests are made on a client on which shutdown has already been
        // invoked.
        client = null;
    }
}