fd8681c3ced116dd3bcfb9f981c9394ded29d37a
[policy/drools-pdp.git] / policy-core / src / main / java / org / openecomp / policy / drools / properties / Lockable.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * policy-core
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.policy.drools.properties;
22
23 /**
24  * Marks a entity as able to lock and unlock.
25  */
26 public interface Lockable {
27         
28         /**
29          * locks this entity
30          * @return true is the lock operation was successful, false otherwise
31          */
32         public boolean lock();
33         
34         /**
35          * unlocks this entity
36          * @return true is the unlock operation was successful, false otherwise
37          */
38         public boolean unlock();
39         
40         /**
41          * is this entity locked?
42          * @return true if the entity is in a locked state, false otherwise
43          */
44         public boolean isLocked();
45 }