Class IdGenerator
Inheritance
System.Object
    IdGenerator
  Inherited Members
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
  Namespace: Apache.NMS.ActiveMQ.Util
Assembly: Apache.NMS.ActiveMQ.dll
Syntax
public class IdGeneratorConstructors
| Improve this Doc View SourceIdGenerator()
Declaration
public IdGenerator()IdGenerator(String)
Declaration
public IdGenerator(string prefix)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | prefix | 
Properties
| Improve this Doc View SourceHostName
As we have to find the hostname as a side-affect of generating a unique stub, we allow it's easy retrevial here
Declaration
public static string HostName { get; }Property Value
| Type | Description | 
|---|---|
| System.String | 
Methods
| Improve this Doc View SourceCompare(String, String)
Does a proper compare on the ids
Declaration
public static int Compare(string id1, string id2)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | id1 | A System.String | 
| System.String | id2 | A System.String | 
Returns
| Type | Description | 
|---|---|
| System.Int32 | A System.Int32 | 
GenerateId()
Generate a Unique Id
Declaration
public string GenerateId()Returns
| Type | Description | 
|---|---|
| System.String | A System.String | 
GenerateSanitizedId()
Generate a unique ID - that is friendly for a URL or file system
Declaration
public string GenerateSanitizedId()Returns
| Type | Description | 
|---|---|
| System.String | A System.String | 
GetSeedFromId(String)
From a generated id - return the seed (i.e. minus the count)
Declaration
public static string GetSeedFromId(string id)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | id | A System.String | 
Returns
| Type | Description | 
|---|---|
| System.String | A System.String | 
GetSequenceFromId(String)
From a generated id - return the generator count
Declaration
public static long GetSequenceFromId(string id)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | id | A System.String | 
Returns
| Type | Description | 
|---|---|
| System.Int64 | A System.Int64 |