Class GuidGenerator

  • All Implemented Interfaces:
    IdGenerator
    Direct Known Subclasses:
    GuidGeneratorWithTime, SafeGuidGenerator

    public class GuidGenerator
    extends java.lang.Object
    implements IdGenerator
    Creates a GUID using UUID.randomUUID().

    In the adapter configuration file this class is aliased as guid-generator which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Summary

      Constructors 
      Constructor Description
      GuidGenerator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String create​(java.lang.Object msg)
      Create a unique id based on the object.
      java.lang.String getUUID()
      Get the next unique ID.
      java.lang.String safeUUID()
      Get a safe UUID
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GuidGenerator

        public GuidGenerator()
    • Method Detail

      • getUUID

        public java.lang.String getUUID()
        Get the next unique ID.
        Returns:
        the next unique ID
      • create

        public java.lang.String create​(java.lang.Object msg)
        Description copied from interface: IdGenerator
        Create a unique id based on the object.
        Specified by:
        create in interface IdGenerator
        Parameters:
        msg - the object to create an id around
        Returns:
        a unique id for use.
        See Also:
        IdGenerator.create(java.lang.Object)
      • safeUUID

        public java.lang.String safeUUID()
        Get a safe UUID
        Returns:
        a UUID stripped of colons and dashes