Merge dev/fluorine work across to master
[unimgr.git] / impl / src / main / java / org / opendaylight / unimgr / mef / nrp / impl / ConnectivityServiceIdResourcePool.java
1 /*
2  * Copyright (c) 2017 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
9 package org.opendaylight.unimgr.mef.nrp.impl;
10
11 import java.text.MessageFormat;
12 import java.util.Random;
13
14 /**
15  * Dummy resource pool.
16  * @author bartosz.michalik@amartus.com
17  */
18 public class ConnectivityServiceIdResourcePool {
19
20     private static Random r = new Random();
21
22     public String getServiceId() {
23         return MessageFormat.format(
24                 "{0}:{1}",
25                 Long.toString(System.currentTimeMillis(), 16),
26                 Integer.toString(r.nextInt(), 16)
27         );
28     }
29
30 }