Package com.netflix.priam.identity

Examples of com.netflix.priam.identity.DoubleRing


    @Test
    public void testDouble() throws Exception
    {
        createInstances();
        int originalSize = factory.getAllIds(config.getAppName()).size();
        new DoubleRing(config, factory, tokenManager).doubleSlots();
        List<PriamInstance> doubled = factory.getAllIds(config.getAppName());
        factory.sort(doubled);

        assertEquals(originalSize * 2, doubled.size());
        validate(doubled);
View Full Code Here


    @Test
    public void testBR() throws Exception
    {
        createInstances();
        int intialSize = factory.getAllIds(config.getAppName()).size();
        DoubleRing ring = new DoubleRing(config, factory, tokenManager);
        ring.backup();
        ring.doubleSlots();
        assertEquals(intialSize * 2, factory.getAllIds(config.getAppName()).size());
        ring.restore();
        assertEquals(intialSize, factory.getAllIds(config.getAppName()).size());
    }
View Full Code Here

    @Test
    public void testDoubleSlots() throws Exception
    {
        createInstances();
        int before = factory.getAllIds("fake-app").size();
        new DoubleRing(config, factory, tokenManager).doubleSlots();
        List<PriamInstance> lst = factory.getAllIds(config.getAppName());
        // sort it so it will look good if you want to print it.
        factory.sort(lst);
        for (int i = 0; i < lst.size(); i++)
        {
View Full Code Here

    @Test
    public void testDoubleGrap() throws Exception
    {
        createInstances();
        new DoubleRing(config, factory, tokenManager).doubleSlots();
        config.zone = "az1";
        config.instance_id = "fakeinstancex";
        int hash = tokenManager.regionOffset(config.getDC());
        identity = createInstanceIdentity("az1", "fakeinstancex");
        printInstance(identity.getInstance(), hash);
View Full Code Here

TOP

Related Classes of com.netflix.priam.identity.DoubleRing

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.