Yuta HIGUCHI | 9ee60f6 | 2014-10-09 10:00:01 -0700 | [diff] [blame^] | 1 | package org.onlab.onos.store.device.impl; |
| 2 | |
| 3 | import static com.google.common.base.Preconditions.checkNotNull; |
| 4 | |
| 5 | import org.apache.commons.lang3.concurrent.ConcurrentException; |
| 6 | import org.apache.commons.lang3.concurrent.ConcurrentInitializer; |
| 7 | import org.onlab.onos.net.device.DeviceDescription; |
| 8 | import org.onlab.onos.store.common.impl.Timestamped; |
| 9 | |
| 10 | // FIXME: consider removing this class |
| 11 | public final class InitDeviceDescs |
| 12 | implements ConcurrentInitializer<DeviceDescriptions> { |
| 13 | |
| 14 | private final Timestamped<DeviceDescription> deviceDesc; |
| 15 | |
| 16 | public InitDeviceDescs(Timestamped<DeviceDescription> deviceDesc) { |
| 17 | this.deviceDesc = checkNotNull(deviceDesc); |
| 18 | } |
| 19 | @Override |
| 20 | public DeviceDescriptions get() throws ConcurrentException { |
| 21 | return new DeviceDescriptions(deviceDesc); |
| 22 | } |
| 23 | } |