Package java.util

Examples of java.util.UUID.timestamp()


                    {
                        @Override
                        protected void runMayThrow() throws Exception
                        {
                            // check to make sure the current version is before this one.
                            if (DatabaseDescriptor.getDefsVersion().timestamp() == version.timestamp())
                                logger.debug("Not appling (equal) " + version.toString());
                            else if (DatabaseDescriptor.getDefsVersion().timestamp() > version.timestamp())
                                logger.debug("Not applying (before)" + version.toString());
                            else
                            {
View Full Code Here


                        protected void runMayThrow() throws Exception
                        {
                            // check to make sure the current version is before this one.
                            if (DatabaseDescriptor.getDefsVersion().timestamp() == version.timestamp())
                                logger.debug("Not appling (equal) " + version.toString());
                            else if (DatabaseDescriptor.getDefsVersion().timestamp() > version.timestamp())
                                logger.debug("Not applying (before)" + version.toString());
                            else
                            {
                                logger.debug("Applying {} from {}", m.getClass().getSimpleName(), message.getFrom());
                                try
View Full Code Here

        // check to see if CL.recovery modified the lastMigrationId. if it did, we need to re apply migrations. this isn't
        // the same as merely reloading the schema (which wouldn't perform file deletion after a DROP). The solution
        // is to read those migrations from disk and apply them.
        UUID currentMigration = DatabaseDescriptor.getDefsVersion();
        UUID lastMigration = Migration.getLastMigrationId();
        if ((lastMigration != null) && (lastMigration.timestamp() > currentMigration.timestamp()))
        {
            MigrationManager.applyMigrations(currentMigration, lastMigration);
        }
       
        SystemTable.purgeIncompatibleHints();
View Full Code Here

     */
    public void test_ConstructorJJ() {
        UUID uuid = new UUID(0xf81d4fae7dec11d0L, 0xa76500a0c91e6bf6L);
        assertEquals(2, uuid.variant());
        assertEquals(1, uuid.version());
        assertEquals(0x1d07decf81d4faeL, uuid.timestamp());
        assertEquals(130742845922168750L, uuid.timestamp());
        assertEquals(0x2765, uuid.clockSequence());
        assertEquals(0xA0C91E6BF6L, uuid.node());
    }

View Full Code Here

    public void test_ConstructorJJ() {
        UUID uuid = new UUID(0xf81d4fae7dec11d0L, 0xa76500a0c91e6bf6L);
        assertEquals(2, uuid.variant());
        assertEquals(1, uuid.version());
        assertEquals(0x1d07decf81d4faeL, uuid.timestamp());
        assertEquals(130742845922168750L, uuid.timestamp());
        assertEquals(0x2765, uuid.clockSequence());
        assertEquals(0xA0C91E6BF6L, uuid.node());
    }

    /**
 
View Full Code Here

    /**
     * @see UUID#timestamp()
     */
    public void test_timestamp() {
        UUID uuid = new UUID(0x0000000000001000L, 0x8000000000000000L);
        assertEquals(0x0, uuid.timestamp());

        uuid = new UUID(0x7777777755551333L, 0x8000000000000000L);
        assertEquals(0x333555577777777L, uuid.timestamp());

        uuid = new UUID(0x0000000000000000L, 0x8000000000000000L);
View Full Code Here

    public void test_timestamp() {
        UUID uuid = new UUID(0x0000000000001000L, 0x8000000000000000L);
        assertEquals(0x0, uuid.timestamp());

        uuid = new UUID(0x7777777755551333L, 0x8000000000000000L);
        assertEquals(0x333555577777777L, uuid.timestamp());

        uuid = new UUID(0x0000000000000000L, 0x8000000000000000L);
        try {
            uuid.timestamp();
            fail("No UnsupportedOperationException");
View Full Code Here

        uuid = new UUID(0x7777777755551333L, 0x8000000000000000L);
        assertEquals(0x333555577777777L, uuid.timestamp());

        uuid = new UUID(0x0000000000000000L, 0x8000000000000000L);
        try {
            uuid.timestamp();
            fail("No UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {}

        uuid = new UUID(0x0000000000002000L, 0x8000000000000000L);
        try {
View Full Code Here

            fail("No UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {}

        uuid = new UUID(0x0000000000002000L, 0x8000000000000000L);
        try {
            uuid.timestamp();
            fail("No UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {}
    }

    /**
 
View Full Code Here

    @Test
    public void verifyOrdering1()
    {
        UUID one = UUIDGen.getTimeUUID();
        UUID two = UUIDGen.getTimeUUID();
        assert one.timestamp() < two.timestamp();
    }


    @Test
    public void testDecomposeAndRaw()
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.