Package org.apache.jackrabbit.mongomk.Revision

Examples of org.apache.jackrabbit.mongomk.Revision.RevisionComparator.purge()


        assertEquals(-1, comp.compare(r1c2, r1c1));
        assertEquals(-1, comp.compare(r2c2, r2c1));
        assertEquals(1, comp.compare(r3c2, r3c1));
       
        // get rid of old timestamps
        comp.purge(0x10);
        assertEquals(
                "1:\n r120-0-1:r20-0-0 r130-0-1:r30-0-0\n" +
                "2:\n r300-0-2:r30-0-0\n", comp.toString());
        comp.purge(0x20);
        assertEquals(
View Full Code Here


        // get rid of old timestamps
        comp.purge(0x10);
        assertEquals(
                "1:\n r120-0-1:r20-0-0 r130-0-1:r30-0-0\n" +
                "2:\n r300-0-2:r30-0-0\n", comp.toString());
        comp.purge(0x20);
        assertEquals(
                "1:\n r130-0-1:r30-0-0\n" +
                "2:\n r300-0-2:r30-0-0\n", comp.toString());
       
        // update an entry
View Full Code Here

        comp.add(new Revision(0x301, 1, 2), new Revision(0x30, 0, 0));
        assertEquals(
                "1:\n r130-0-1:r30-0-0\n" +
                "2:\n r301-1-2:r30-0-0\n", comp.toString());
       
        comp.purge(0x30);
        assertEquals("", comp.toString());

    }

}
View Full Code Here

        assertEquals(-1, comp.compare(r1c2, r1c1));
        assertEquals(-1, comp.compare(r2c2, r2c1));
        assertEquals(1, comp.compare(r3c2, r3c1));
       
        // get rid of old timestamps
        comp.purge(10);
        assertEquals(
                "1: r120-0-1:20 r130-0-1:30; " +
                "2: r300-0-2:30; ", comp.toString());
        comp.purge(20);
        assertEquals(
View Full Code Here

        // get rid of old timestamps
        comp.purge(10);
        assertEquals(
                "1: r120-0-1:20 r130-0-1:30; " +
                "2: r300-0-2:30; ", comp.toString());
        comp.purge(20);
        assertEquals(
                "1: r130-0-1:30; " +
                "2: r300-0-2:30; ", comp.toString());
       
        // update an entry
View Full Code Here

        comp.add(new Revision(0x301, 1, 2), 30);
        assertEquals(
                "1: r130-0-1:30; " +
                "2: r301-1-2:30; ", comp.toString());
       
        comp.purge(30);
        assertEquals("", comp.toString());

    }

}
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.