Package com.yahoo.config.provision
Class ApplicationId
- java.lang.Object
-
- com.yahoo.config.provision.ApplicationId
-
- All Implemented Interfaces:
java.lang.Comparable<ApplicationId>
public final class ApplicationId extends java.lang.Object implements java.lang.Comparable<ApplicationId>
A complete, immutable identification of an application instance.- Author:
- Ulf Lilleengen, vegard, bratseth
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ApplicationId.Builder
-
Constructor Summary
Constructors Constructor Description ApplicationId(com.yahoo.cloud.config.ApplicationIdConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationName
application()
int
compareTo(ApplicationId other)
static ApplicationId
defaultId()
Returns an application id where all fields are "default"boolean
equals(java.lang.Object other)
static ApplicationId
from(TenantName tenant, ApplicationName application, InstanceName instance)
static ApplicationId
from(java.lang.String tenant, java.lang.String application, java.lang.String instance)
static ApplicationId
fromFullString(java.lang.String idString)
static ApplicationId
fromSerializedForm(java.lang.String idString)
static ApplicationId
global()
Returns an application id where all fields are "*"int
hashCode()
InstanceName
instance()
java.lang.String
serializedForm()
Returns a serialized form of the content of this: tenant:application:instanceTenantName
tenant()
java.lang.String
toFullString()
Returns "dotted" string (tenant.application.instance) with instance name always includedjava.lang.String
toShortString()
Returns "dotted" string (tenant.application.instance) with instance name omitted if it is "default"java.lang.String
toString()
-
-
-
Method Detail
-
from
public static ApplicationId from(TenantName tenant, ApplicationName application, InstanceName instance)
-
from
public static ApplicationId from(java.lang.String tenant, java.lang.String application, java.lang.String instance)
-
fromSerializedForm
public static ApplicationId fromSerializedForm(java.lang.String idString)
-
fromFullString
public static ApplicationId fromFullString(java.lang.String idString)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
serializedForm
public java.lang.String serializedForm()
Returns a serialized form of the content of this: tenant:application:instance
-
toShortString
public java.lang.String toShortString()
Returns "dotted" string (tenant.application.instance) with instance name omitted if it is "default"
-
toFullString
public java.lang.String toFullString()
Returns "dotted" string (tenant.application.instance) with instance name always included
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
tenant
public TenantName tenant()
-
application
public ApplicationName application()
-
instance
public InstanceName instance()
-
compareTo
public int compareTo(ApplicationId other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<ApplicationId>
-
defaultId
public static ApplicationId defaultId()
Returns an application id where all fields are "default"
-
global
public static ApplicationId global()
Returns an application id where all fields are "*"
-
-