1e2aa4659dd3b6f4641ce40d8f28a61ddd5832a0
[mdsal.git] / singleton-service / mdsal-singleton-common-api / src / main / java / org / opendaylight / mdsal / singleton / common / api / ServiceGroupIdentifier.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.mdsal.singleton.common.api;
9
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.opendaylight.yangtools.concepts.Identifier;
12
13 /**
14  * An {@link Identifier} of a group of {@link ClusterSingletonService}s.
15  *
16  * @param value String value, must not be {@link String#isBlank()}
17  */
18 public record ServiceGroupIdentifier(@NonNull String value) implements Identifier {
19     @java.io.Serial
20     private static final long serialVersionUID = 1L;
21
22     public ServiceGroupIdentifier {
23         if (value.isBlank()) {
24             throw new IllegalArgumentException("Value must not be blank");
25         }
26     }
27 }