Example usage for com.amazonaws.services.elasticache.model CacheCluster getCacheClusterId

List of usage examples for com.amazonaws.services.elasticache.model CacheCluster getCacheClusterId

Introduction

In this page you can find the example usage for com.amazonaws.services.elasticache.model CacheCluster getCacheClusterId.

Prototype


public String getCacheClusterId() 

Source Link

Document

The user-supplied identifier of the cluster.

Usage

From source file:org.springframework.cloud.aws.cache.ElastiCacheFactoryBean.java

License:Apache License

private static Endpoint getEndpointForCache(CacheCluster cacheCluster) {
    if (cacheCluster.getConfigurationEndpoint() != null) {
        return cacheCluster.getConfigurationEndpoint();
    }/*from   www.  ja va2 s.  c o m*/

    if (!cacheCluster.getCacheNodes().isEmpty()) {
        return cacheCluster.getCacheNodes().get(0).getEndpoint();
    }

    throw new IllegalArgumentException("No Configuration Endpoint or Cache Node available to "
            + "receive address information for cluster:'" + cacheCluster.getCacheClusterId() + "'");
}