summaryrefslogtreecommitdiffstats
path: root/application-model/src/main/scala/com/yahoo/vespa/applicationmodel/ServiceClusterKey.scala
blob: 48a19311ffe4a0b2b5ff4eb3efbbfd3d58c66d0f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
 */
case class ServiceClusterKey(clusterId: ClusterId, serviceType: ServiceType) {
  // 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"${clusterId}:${serviceType}"
}