All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mule.util.UUID Maven / Gradle / Ivy

There is a newer version: 3.9.0
Show newest version
/*
 * $Id: UUID.java 20746 2010-12-15 14:20:27Z dirk.olmes $
 * --------------------------------------------------------------------------------------
 * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 *
 * The software in this package is published under the terms of the CPAL v1.0
 * license, a copy of which has been included with this distribution in the
 * LICENSE.txt file.
 */

package org.mule.util;

import org.safehaus.uuid.UUIDGenerator;

/**
 * UUID Generates a UUID using the Safehaus UUID generator
 * rather than the built-in version of JDK5. In our performance tests we found the Java version
 * to be blocking much more than the Safehaus one.
 */
// @ThreadSafe
public final class UUID
{
    private static final UUIDGenerator generator = UUIDGenerator.getInstance();

    private UUID()
    {
        // no go
    }

    public static String getUUID()
    {
        return generator.generateTimeBasedUUID().toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy