Package com.netflix.ice.tag

Examples of com.netflix.ice.tag.Product


        Set<Product> newProducts = Sets.newHashSet();
        AmazonS3Client s3Client = AwsUtils.getAmazonS3Client();
        for (S3ObjectSummary s3ObjectSummary: s3Client.listObjects(config.workS3BucketName, config.workS3BucketPrefix + TagGroupWriter.DB_PREFIX).getObjectSummaries()) {
            String key = s3ObjectSummary.getKey();
            Product product;
            if (key.endsWith("_all")) {
                product = null;
            }
            else {
                String name = key.substring((config.workS3BucketPrefix + TagGroupWriter.DB_PREFIX).length());
View Full Code Here


        productsByAwsName.put(monitor.awsName, monitor.product);
        productsByName.put(monitor.product.name, monitor.product);
    }

    public Product getProductByAwsName(String awsName) {
        Product product = productsByAwsName.get(awsName);
        if (product == null) {
            product = new Product(awsName);
            productsByAwsName.put(awsName, product);
            productsByName.put(awsName, product);
        }
        return product;
    }
View Full Code Here

        }
        return product;
    }

    public Product getProductByName(String name) {
        Product product = productsByName.get(name);
        if (product == null) {
            product = new Product(name);
            productsByAwsName.put(name, product);
            productsByName.put(name, product);
        }
        return product;
    }
View Full Code Here

    // does nothing really...
    service.commit();

    assertNotNull(service.getProductsWithResources());

    assertEquals("Product-name for unsupported resource", "somename", service.getResource(null, null, new Product("somename"), null, null, 0));
    assertEquals("Error for empty resourceId", "Error", service.getResource(null, null, Product.ec2, null, null, 0));
    assertEquals("Error for empty resourceId", "Error", service.getResource(null, null, Product.ec2, "", null, 0));

    assertEquals("Unknown for resourceIds that we do not find", "Unknown", service.getResource(null, null, Product.ec2, "someunknowninstance", null, 0));
View Full Code Here

TOP

Related Classes of com.netflix.ice.tag.Product

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.