Initial code drop of yang model driven configuration system
[controller.git] / opendaylight / config / config-manager / src / main / java / org / opendaylight / controller / config / manager / impl / dynamicmbean / ReadOnlyAtomicBoolean.java
1 /*
2  * Copyright (c) 2013 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.controller.config.manager.impl.dynamicmbean;
9
10 import java.util.concurrent.atomic.AtomicBoolean;
11
12 public interface ReadOnlyAtomicBoolean {
13     boolean get();
14
15     public static class ReadOnlyAtomicBooleanImpl implements
16             ReadOnlyAtomicBoolean {
17         private final AtomicBoolean atomicBoolean;
18
19         public ReadOnlyAtomicBooleanImpl(AtomicBoolean atomicBoolean) {
20             super();
21             this.atomicBoolean = atomicBoolean;
22         }
23
24         @Override
25         public boolean get() {
26             return atomicBoolean.get();
27         }
28
29     }
30 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.