Package com.sun.sgs.impl.service.nodemap.affinity.dlpa

Examples of com.sun.sgs.impl.service.nodemap.affinity.dlpa.LabelPropagation.prepareAlgorithm()


        // testing node failures here.
        LabelPropagation lp1 =
            new LabelPropagation(new PartialToyBuilder(PartialToyBuilder.NODE1),
                    wdog, PartialToyBuilder.NODE1, props);
        server.shutdown();
        lp1.prepareAlgorithm(1);
    }

    @Test
    public void testRegister() throws Exception {
        final int nodeId = 10;
View Full Code Here


    @Test
    public void testAffinityGroupsTwice() throws Exception {
        LabelPropagation lp1 =
            new LabelPropagation(new PartialToyBuilder(PartialToyBuilder.NODE1),
                    wdog, PartialToyBuilder.NODE1, props);
        lp1.prepareAlgorithm(1);
        int count = 0;
        while (server.readyToBeginCount() < 1) {
            Thread.sleep(5);
            if (++count > MAX_SLEEP_COUNT) {
                fail("Too much time sleeping");
View Full Code Here

    @Test
    public void testPrepareTwice() throws Exception {
        LabelPropagation lp1 =
            new LabelPropagation(new PartialToyBuilder(PartialToyBuilder.NODE1),
                    wdog, PartialToyBuilder.NODE1, props);
        lp1.prepareAlgorithm(1);
        lp1.prepareAlgorithm(1);
        int count = 0;
        while (server.readyToBeginCount() < 1) {
            Thread.sleep(5);
            if (++count > MAX_SLEEP_COUNT) {
View Full Code Here

    public void testPrepareTwice() throws Exception {
        LabelPropagation lp1 =
            new LabelPropagation(new PartialToyBuilder(PartialToyBuilder.NODE1),
                    wdog, PartialToyBuilder.NODE1, props);
        lp1.prepareAlgorithm(1);
        lp1.prepareAlgorithm(1);
        int count = 0;
        while (server.readyToBeginCount() < 1) {
            Thread.sleep(5);
            if (++count > MAX_SLEEP_COUNT) {
                fail("Too much time sleeping");
View Full Code Here

    @Test
    public void testIterationTwice() throws Exception {
        LabelPropagation lp1 =
            new LabelPropagation(new PartialToyBuilder(PartialToyBuilder.NODE1),
                    wdog, PartialToyBuilder.NODE1, props);
        lp1.prepareAlgorithm(1);
        int count = 0;
        while (server.readyToBeginCount() < 1) {
            Thread.sleep(5);
            if (++count > MAX_SLEEP_COUNT) {
                fail("Too much time sleeping");
View Full Code Here

    @Test(expected = IllegalArgumentException.class)
    public void testAffinityGroupsRunMismatch() throws Exception {
        LabelPropagation lp1 =
            new LabelPropagation(new PartialToyBuilder(PartialToyBuilder.NODE1),
                    wdog, PartialToyBuilder.NODE1, props);
        lp1.prepareAlgorithm(1);
        int count = 0;
        while (server.readyToBeginCount() < 1) {
            Thread.sleep(5);
            if (++count > MAX_SLEEP_COUNT) {
                fail("Too much time sleeping");
View Full Code Here

    @Test
    public void testIterationMismatch() throws Exception {
        LabelPropagation lp1 =
            new LabelPropagation(new PartialToyBuilder(PartialToyBuilder.NODE1),
                    wdog, PartialToyBuilder.NODE1, props);
        lp1.prepareAlgorithm(1);
        int count = 0;
        while (server.readyToBeginCount() < 1) {
            Thread.sleep(5);
            if (++count > MAX_SLEEP_COUNT) {
                fail("Too much time sleeping");
View Full Code Here

                    wdog, PartialToyBuilder.NODE3, props);

        long run = 1;
        lp1.prepareAlgorithm(run);
        lp2.prepareAlgorithm(run);
        lp3.prepareAlgorithm(run);
        // Wait until all 3 callbacks have occurred
        int count = 0;
        while (server.readyToBeginCount() < 3) {
            Thread.sleep(5);
            if (++count > MAX_SLEEP_COUNT) {
View Full Code Here

        lp2.getAffinityGroups(run, true);
        lp3.getAffinityGroups(run, true);
        server.clear();
        System.out.println("Exchanging info a second time");
        run++;
        lp3.prepareAlgorithm(run);
        lp2.prepareAlgorithm(run);
        lp1.prepareAlgorithm(run);
        // Wait until all 3 callbacks have occurred
        count = 0;
        while (server.readyToBeginCount() < 3) {
View Full Code Here

        LabelPropagation lp3 =
            new LabelPropagation(new PartialToyBuilder(PartialToyBuilder.NODE3),
                    wdog, PartialToyBuilder.NODE3, props);
        lp1.prepareAlgorithm(1);
        lp2.prepareAlgorithm(1);
        lp3.prepareAlgorithm(1);
        int count = 0;
        while (server.readyToBeginCount() < 3) {
            Thread.sleep(5);
            if (++count > MAX_SLEEP_COUNT) {
                fail("Too much time sleeping");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.