diff options
Diffstat (limited to 'application-model/src/main/scala/com/yahoo/vespa/applicationmodel/ApplicationInstanceId.scala')
-rw-r--r-- | application-model/src/main/scala/com/yahoo/vespa/applicationmodel/ApplicationInstanceId.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/application-model/src/main/scala/com/yahoo/vespa/applicationmodel/ApplicationInstanceId.scala b/application-model/src/main/scala/com/yahoo/vespa/applicationmodel/ApplicationInstanceId.scala new file mode 100644 index 00000000000..8c1bfe284fa --- /dev/null +++ b/application-model/src/main/scala/com/yahoo/vespa/applicationmodel/ApplicationInstanceId.scala @@ -0,0 +1,15 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.vespa.applicationmodel + +import com.fasterxml.jackson.annotation.JsonValue + +/** + * @author bakksjo + */ + // TODO: Remove this and use ApplicationName/InstanceName instead (if you need it for the JSON stuff move it to that layer and don't let it leak) +case class ApplicationInstanceId(s: String) { + // Jackson's StdKeySerializer uses toString() (and ignores annotations) for objects used as Map keys. + // Therefore, we use toString() as the JSON-producing method, which is really sad. + @JsonValue + override def toString(): String = s +} |