Class ApplicationId

java.lang.Object
dev.getelements.elements.sdk.cluster.id.ApplicationId
All Implemented Interfaces:
Serializable, Comparable<dev.getelements.elements.sdk.cluster.id.HasCompoundId<dev.getelements.elements.sdk.cluster.id.V1CompoundId>>

public class ApplicationId extends Object implements Serializable
Uniquely identifies an application.
See Also:
  • Constructor Details

    • ApplicationId

      public ApplicationId(UUID applicationUuid)
      Creates a new unique TaskId.
    • ApplicationId

      public ApplicationId(String stringRepresentation)
      Creates the TaskId from the provided string representation, as obtained from asString().
      Parameters:
      stringRepresentation - the string representation
    • ApplicationId

      public ApplicationId(byte[] byteRepresentation)
      Creates the TaskId from the provided string representation, as obtained from asBytes().
      Parameters:
      byteRepresentation - the string representation
  • Method Details

    • getId

      public dev.getelements.elements.sdk.cluster.id.V1CompoundId getId()
    • getApplicationUUID

      public UUID getApplicationUUID()
      Gets the UUID associated with this ApplicationId
      Returns:
      the UUID for the application
    • asBytes

      public byte[] asBytes()
      Returns the
      invalid reference
      byte[]
      representation of this TaskId
      Returns:
      the value as bytes
    • asString

      public String asString()
      Returns the string representation of this TaskId
      Returns:
      the string representation
    • 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
    • valueOf

      public static ApplicationId valueOf(String value)
      The Java standard valueOf method.
      Parameters:
      value - the value
      Returns:
      the ApplicationId
    • randomApplicationId

      public static ApplicationId randomApplicationId()
      Generates a randomly assigned ApplicationId
      Returns:
      a randomly assigned globally unique ApplicationId
    • forUniqueName

      public static ApplicationId forUniqueName(String uniqueApplicationName)
      Creates a new ApplicationId from the given unique application name. The unique application name may be any string uniquely representing the application (such as database primary key) or similar.
      Parameters:
      uniqueApplicationName - the unique application name
      Returns:
      the newly created ApplicationId
    • compareTo

      default int compareTo(dev.getelements.elements.sdk.cluster.id.HasCompoundId<dev.getelements.elements.sdk.cluster.id.V1CompoundId> o)
      Compares this instance with the other instance.
      Specified by:
      compareTo in interface Comparable<CompoundIdT extends Comparable<CompoundIdT>>
      Parameters:
      o - the instance
      Returns: