Class IdGenerator


  • public class IdGenerator
    extends java.lang.Object
    Generator for Globally unique Strings used to identify resources within a given Connection.
    • Constructor Summary

      Constructors 
      Constructor Description
      IdGenerator()
      Construct an IdGenerator using the default prefix value.
      IdGenerator​(java.lang.String prefix)
      Construct an IdGenerator using the given prefix value as the initial prefix entry for all Ids generated (default is 'ID:').
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String generateId()
      Generate a unique id using the configured characteristics.
      protected static java.lang.String sanitizeHostName​(java.lang.String hostName)  
      • Methods inherited from class java.lang.Object

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

      • PROPERTY_IDGENERATOR_HOST_PREFIX

        public static final java.lang.String PROPERTY_IDGENERATOR_HOST_PREFIX
        See Also:
        Constant Field Values
    • Constructor Detail

      • IdGenerator

        public IdGenerator​(java.lang.String prefix)
        Construct an IdGenerator using the given prefix value as the initial prefix entry for all Ids generated (default is 'ID:').
        Parameters:
        prefix - The prefix value that is applied to all generated IDs.
      • IdGenerator

        public IdGenerator()
        Construct an IdGenerator using the default prefix value.
    • Method Detail

      • generateId

        public java.lang.String generateId()
        Generate a unique id using the configured characteristics.
        Returns:
        a newly generated unique id value.
      • sanitizeHostName

        protected static java.lang.String sanitizeHostName​(java.lang.String hostName)