Class NamespacedInstanceId

java.lang.Object
me.ahoo.cosid.machine.NamespacedInstanceId

public class NamespacedInstanceId extends Object
Combines namespace with instance ID for unique identification.

Used to ensure machine IDs are unique across different namespaces/business domains.

  • Constructor Details

    • NamespacedInstanceId

      public NamespacedInstanceId(String namespace, InstanceId instanceId)
      Creates a new namespaced instance ID.
      Parameters:
      namespace - the namespace
      instanceId - the instance ID
  • Method Details

    • getNamespace

      public String getNamespace()
      Gets the namespace.
      Returns:
      the namespace
    • getInstanceId

      public InstanceId getInstanceId()
      Gets the instance ID.
      Returns:
      the instance ID
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object