Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright 2010-2015, Inc. or its affiliates. All Rights Reserved.
  * Licensed under the Apache License, Version 2.0 (the "License").
  * You may not use this file except in compliance with the License.
  * A copy of the License is located at
 * or in the "license" file accompanying this file. This file is distributed
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
package com.amazonaws.metrics.internal.cloudwatch;
The default AWS SDK metric collector factory. This class is instantiated via reflection if the default AWS SDK metrics is enabled via the system property com.amazonaws.SDKGlobalConfiguration.DEFAULT_METRICS_SYSTEM_PROPERTY.
    implements MetricCollector.Factory {
Returns a instance of the Amazon CloudWatch request metric collector either by starting up a new one or returning an existing one if it's already started; null if any failure.
    public MetricCollector getInstance() {
        AWSCredentialsProvider provider = AwsSdkMetrics.getCredentialProvider();
        Regions region = AwsSdkMetrics.getRegion();
        Integer qSize = AwsSdkMetrics.getMetricQueueSize();
        Long timeoutMilli = AwsSdkMetrics.getQueuePollTimeoutMilli();
        CloudWatchMetricConfig config = new CloudWatchMetricConfig();
        if (provider != null)
        if (region != null) {
            String endPoint = "monitoring." + region.getName() + "";
        if (qSize != null)
        if (timeoutMilli != null)
        return MetricCollectorSupport.getInstance();
New to GrepCode? Check out our FAQ X