Sithara Punnassery
Committed by Gerrit Code Review

ONOS-5318 Proprietary Config Store

Change-Id: Ic787d73d9d541a93f5e957a3369dbab4b5fa9a6c
......@@ -86,6 +86,17 @@ public class DocumentPath implements Comparable<DocumentPath> {
}
/**
* Returns the relative path to the given node.
*
* @return relative path to the given node.
*/
public DocumentPath childPath() {
if (pathElements.size() <= 1) {
return null;
}
return new DocumentPath(this.pathElements.subList(pathElements.size() - 1, pathElements.size()));
}
/**
* Returns a path for the parent of this node.
*
* @return parent node path. If this path is for the root, returns {@code null}.
......@@ -183,7 +194,6 @@ public class DocumentPath implements Comparable<DocumentPath> {
return this.pathElements.get(i).compareTo(that.pathElements.get(i));
}
}
if (this.pathElements.size() > that.pathElements.size()) {
return 1;
} else if (that.pathElements.size() > this.pathElements.size()) {
......
/*
* Copyright 2016-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.incubator.elasticcfg;
import java.util.Set;
/**
* Abstraction for Filters that can be used while traversing the PropConfig stores.
* This abstraction allows to select entries of interest based on various criteria
* defined by this interface.
* Only criteria based on {@code ConfigNodePath} are supported currently.
* Filters can be used with "GET" methods of {@code ProprietaryConfigService}
*/
public interface ConfigFilter {
/**
* Builder for ConfigFilter.
*/
interface Builder {
/**
* Adds new ConfigNodePath filtering criteria to a ConfigFilter object.
* If the same ConfigNodePath is already part of the criteria
* for the object, it will not be added again, but will not throw any exceptions.
* This will not check for the validity of the ConfigNodePath.
*
* @param add new criteria
* @return a ConfigFilter builder
*/
Builder addCriteria(Set<ConfigNodePath> add);
/**
* Removes the given ConfigNodePath filtering criteria from a ConfigFilter object.
* If the ConfigNodePath was NOT already part of the criteria for
* the object, it will not be removed, but will not throw any exceptions.
* This will not check for the validity of the PropCfgInstancePaths.
*
* @param remove criteria to be removed
* @return a ConfigFilter builder
*/
Builder removeCriteria(Set<ConfigNodePath> remove);
/**
* Builds an immutable ConfigFilter entity.
*
* @return ConfigFilter
*/
ConfigFilter build();
}
/**
* Method to list all the ConfigNodePath criteria that are in place for a ConfigFilter.
*
* @return Set of ConfigNodePath criteria for this entity
*/
Set<ConfigNodePath> getCriteria();
/**
* Method to create a filter that include all entries rejected by the criteria.
*
* @param original filter object with a criteria set
* @return ConfigFilter object with negated criteria set
* @throws InvalidFilterException if the received ConfigFilter object
* was null or if it had an empty criteria set
*/
ConfigFilter negateFilter(ConfigFilter original);
/**
* Method to check if the ConfigFilter has an empty criteria set.
*
* @return {@code true} if criteria set is empty, {@code true} otherwise.
*/
boolean isEmptyFilter();
}
\ No newline at end of file
/*
* Copyright 2016-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.incubator.elasticcfg;
import java.util.List;
/**
* Abstraction of an instance in the elastic config store.
*/
public interface ConfigNode<V> {
/**
* Builder for ConfigNode.
*/
interface Builder<V> {
/**
* Adds the type of the instance node.
*
* @param type node type
* @return a ConfigNode builder
*/
Builder addType(NodeType type);
/**
* Adds the value of the instance node.
*
* @param value at the node
* @return a ConfigNode builder
*/
Builder addValue(Class<V> value);
/**
* Adds children to the children field.
*
* @param children to be added
* @return a ConfigNode builder
*/
Builder addChildren(Class<ConfigNode> children);
/**
* Builds an immutable ConfigNode entity.
*
* @return ConfigNode
*/
ConfigNode build();
}
/**
* Returns the type of the instance node.
*
* @return node type
*/
NodeType type();
/**
* Returns the value of the instance node.
*
* @return value at the node
*/
Class<V> value();
/**
* Returns the children of the instance node.
*
* @return children of the node
*/
List<ConfigNode> children();
}
\ No newline at end of file
/*
* Copyright 2016-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.incubator.elasticcfg;
import org.onlab.util.Identifier;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Abstraction of the key to an instance in the elastic config store.
* Path to each node would contain info about its hierarchy too.
*/
public final class ConfigNodePath extends Identifier<String> {
private final String parentKey;
private final String nodeKey;
/**
* Creates a new ConfigNodePath from parentKey and nodeKey.
*
* @param parentKey absolute path to the parent.
* @param nodeKey relative path to the node.
*/
public ConfigNodePath(String parentKey, String nodeKey) {
super(checkNotNull(parentKey, "parent key is null").concat(checkNotNull(nodeKey, "node key is null")));
this.parentKey = parentKey;
this.nodeKey = nodeKey;
}
/**
* Returns the parent key.
*
* @return absolute path to the parent
*/
public String parentKey() {
return parentKey;
}
/**
* Returns the node key.
*
* @return relative path to the node
*/
public String nodeKey() {
return nodeKey;
}
}
\ No newline at end of file
/*
* Copyright 2016-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.incubator.elasticcfg;
/**
* Designates the store type for various Proprietary Config stores.
*/
public enum ConfigStoreType {
/**
* Network Element Config.
*/
NE_CONFIG,
/**
* Network Config.
*/
NW_CONFIG,
}
\ No newline at end of file
/*
* Copyright 2016-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.incubator.elasticcfg;
import org.onosproject.event.AbstractEvent;
/**
* Describes a ProprietaryConfig event.
*/
public class ElasticConfigEvent extends AbstractEvent<ElasticConfigEvent.Type, ConfigNodePath> {
private final ConfigNode value;
/**
* Type of configuration events.
*/
public enum Type {
/**
* Signifies that a prop configuration instance was added.
*/
NODE_ADDED,
/**
* Signifies that prop configuration instance was updated.
*/
NODE_UPDATED,
/**
* Signifies that prop configuration instance was removed.
*/
NODE_REMOVED,
/**
* Signifies that a prop configuration subtree was added.
*/
SUBTREE_ADDED,
/**
* Signifies that prop configuration subtree was updated.
*/
SUBTREE_UPDATED,
/**
* Signifies that prop configuration subtree was removed.
*/
SUBTREE_REMOVED
}
/**
* Creates an event of a given type, config node value and config node path.
*
* @param type config node type
* @param path config node path
* @param value config node value
*/
public ElasticConfigEvent(Type type, ConfigNodePath path, ConfigNode value) {
super(type, path);
this.value = value;
}
/**
* Returns the config node value.
*
* @return ConfigNode value
*/
public ConfigNode value() {
return value;
}
}
\ No newline at end of file
/*
* Copyright 2015-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.incubator.elasticcfg;
import org.onosproject.event.EventListener;
/**
* Entity capable of receiving elastic config change events.
*/
public interface ElasticConfigListener extends EventListener<ElasticConfigEvent> {
}
/*
* Copyright 2016-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.incubator.elasticcfg;
import org.onosproject.event.ListenerService;
import java.util.concurrent.CompletableFuture;
/**
* Service for storing and distributing elastic configuration data.
*/
public interface ElasticConfigService
extends ListenerService<ElasticConfigEvent, ElasticConfigListener> {
/**
* Adds a new node to the elastic config store.
*
* @param store type of store to which the application wants to add the node to.
* @param path data structure with absolute path to the parent and relative
* path to the node
* @param node data structure with nodetype and value to be stored at the node
* @return future that is completed with {@code true} if the new node was successfully
* added. Future will be completed with {@code false} if a node already exists at
* the specified path. Future will be completed exceptionally with a
* {@code FailedException} if the parent node (for the node to create) does not exist.
*/
CompletableFuture<Boolean> addNode(ConfigStoreType store,
ConfigNodePath path, ConfigNode node);
/**
* Removes a node from the elastic config store.
*
* @param store type of store which the application wants to access.
* @param path data structure with absolute path to the parent and
* relative path to the node
* @return future for the previous value. Future will be completed with a
* {@code FailedException} if the node to be removed is either the root
* node or has one or more children or if the node to be removed does not exist.
*/
CompletableFuture<ConfigNode> removeNode(ConfigStoreType store, ConfigNodePath path);
/**
* Creates/Updates a node in the elastic config store.
*
* @param store type of store which the application wants to access.
* @param path data structure with absolute path to the parent and
* relative path to the node
* @param node data structure with nodetype and new value to be stored at the node
* @return future for the previous value. Future will be completed with {@code null}
* if there was no node previously at that path.
* Future will be completed with a {@code FailedException}
* if the parent node (for the node to create/update) does not exist.
*/
CompletableFuture<ConfigNode> updateNode(ConfigStoreType store,
ConfigNodePath path, ConfigNode node);
/**
* Creates nodes in the elastic config store, recursively by creating
* all missing intermediate nodes in the path.
*
* @param store type of store which the application wants to access.
* @param path data structure with absolute path to the parent and relative
* path to the node
* @param node recursive data structure with nodetype and value to
* be stored at the node
* @return future that is completed with {@code true} if all the new
* nodes were successfully
* created. Future will be completed with {@code false} if any node
* already exists at the specified path
* //TODO
*/
CompletableFuture<Boolean> createRecursive(ConfigStoreType store,
ConfigNodePath path, ConfigNode node);
/**
* Delete nodes in the elastic config store, recursively by deleting all
* intermediate nodes in the path.
*
* @param store type of store which the appplication wants to access.
* @param path data structure with absolute path to the parent and
* relative path to the node
* @return future that is completed with {@code true} if all the
* nodes under the given path including the node at the path could
* be successfully deleted. Future will be completed with {@code false}
* if the node at the given path or any parent node
* did not exist //TODO
*/
CompletableFuture<Boolean> deleteRecursive(ConfigStoreType store, ConfigNodePath path);
/**
* Creates/Updates nodes in the elastic config store, recursively by creating
* all missing intermediate nodes in the path.
*
* @param store type of store which the appplication wants to access.
* @param path data structure with absolute path to the parent and
* relative path to the node
* @param node recursive data structure with nodetype and value to
* be stored at the node
* @return future that is completed with {@code true} if all the
* nodes under the given path
* including the node at the path could be successfully updated.
* Future will be completed with {@code false} if the node at the
* given path or any parent node
* did not exist //TODO
*/
CompletableFuture<Boolean> updateRecursive(ConfigStoreType store,
ConfigNodePath path, ConfigNode node);
/**
* Returns a value node or subtree under the given path.
*
* @param store type of store which the application wants to access.
* @param path data structure with absolute path to the parent and
* relative path to the node
* @param mode whether to retrieve the nodes recursively or not
* @param filter filtering conditions to be applied on the result
* list of nodes.
* @return future that will be completed either with a value node
* or a recursive data structure containing the subtree;
* will be completed with {@code null} if
* after applying the filter, the result is an empty list of nodes.
* Future will be completed with a {@code FailedException} if path
* does not point to a valid node.
*
*/
CompletableFuture<ConfigNode> getNode(ConfigStoreType store,
ConfigNodePath path, TraversalMode mode,
ConfigFilter filter);
/**
* Returns the number of children under the given path, excluding
* the node at the path.
*
* @param store type of store which the application wants to access.
* @param path data structure with absolute path to the parent and
* relative path to the node
* @param filter how the value nodes should be filtered
* @return future that will be completed with {@code Integer}, the
* count of the children
* after applying the filtering conditions as well.
* Future will be completed with a {@code FailedException} if path
* does not point to a valid node
*/
CompletableFuture<Integer> getNumberOfChildren(ConfigStoreType store,
ConfigNodePath path, ConfigFilter filter);
//TODO
/**
* Filter
* What should be the filtering conditions?
* a list of keys? node attribute/s? level1 children?
* Merge Trees
* add sub tree
* delete subtree
* update sub tree
* get sub tree
* How to handle big subtrees?
* how many levels? how many results to limit?
*/
/**
* Registers a listener to be notified when the subtree rooted at
* the specified path
* is modified.
*
* @param store type of store which the application wants to access.
* @param path data structure with absolute path to the parent and
* relative path to the node
* @param listener listener to be notified
* @return a future that is completed when the operation completes
*/
CompletableFuture<Void> addConfigListener(ConfigStoreType store,
ConfigNodePath path,
ElasticConfigListener listener);
/**
* Unregisters a previously added listener.
*
* @param listener listener to unregister
* @return a future that is completed when the operation completes
*/
CompletableFuture<Void> removeConfigListener(ElasticConfigListener listener);
}
\ No newline at end of file
/*
* Copyright 2016-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.incubator.elasticcfg;
import org.onosproject.store.Store;
import java.util.concurrent.CompletableFuture;
/**
* Store service for storing and distributing elastic configuration data.
*/
public interface ElasticConfigStore
extends Store<ElasticConfigEvent, ElasticConfigStoreDelegate> {
/**
* Adds a new node to the ElasticConfigStore.
*
* @param store type of store to which the application wants to add the node to.
* @param path data structure with absolute path to the parent and relative
* path to the node
* @param node data structure with nodetype and value to be stored at the node
* @return future that is completed with {@code true} if the new node was successfully
* added. Future will be completed with {@code false} if a node already exists at
* the specified path. Future will be completed exceptionally with a
* {@code FailedException} if the parent node (for the node to create) does not exist.
*/
CompletableFuture<Boolean>
addNode(ConfigStoreType store, ConfigNodePath path, ConfigNode node);
/**
* Removes a node from the ElasticConfigStore.
*
* @param store type of store which the application wants to access.
* @param path data structure with absolute path to the parent and
* relative path to the node
* @return future for the previous value. Future will be completed with a
* {@code FailedException} if the node to be removed is either the root
* node or has one or more children or if the node to be removed does not exist.
*/
CompletableFuture<ConfigNode>
removeNode(ConfigStoreType store, ConfigNodePath path);
/**
* Creates/Updates a node in the ElasticConfigStore.
*
* @param store type of store which the application wants to access.
* @param path data structure with absolute path to the parent and
* relative path to the node
* @param node data structure with nodetype and new value to be stored at the node
* @return future for the previous value. Future will be completed with {@code null}
* if there was no node previously at that path.
* Future will be completed with a {@code FailedException}
* if the parent node (for the node to create/update) does not exist.
*/
CompletableFuture<ConfigNode>
updateNode(ConfigStoreType store, ConfigNodePath path, ConfigNode node);
/**
* Creates nodes in the ElasticConfigStore, recursively by creating
* all missing intermediate nodes in the path.
*
* @param store type of store which the application wants to access.
* @param path data structure with absolute path to the parent and relative
* path to the node
* @param node recursive data structure with nodetype and value to
* be stored at the node
* @return future that is completed with {@code true} if all the new
* nodes were successfully
* created. Future will be completed with {@code false} if any node
* already exists at the specified path
* //TODO
*/
CompletableFuture<Boolean>
createRecursive(ConfigStoreType store, ConfigNodePath path,
ConfigNode node);
/**
* Delete nodes in the ElasticConfigStore, recursively by deleting all
* intermediate nodes in the path.
*
* @param store type of store which the appplication wants to access.
* @param path data structure with absolute path to the parent and
* relative path to the node
* @return future that is completed with {@code true} if all the
* nodes under the given path including the node at the path could
* be successfully deleted. Future will be completed with {@code false}
* if the node at the given path or any parent node
* did not exist //TODO
*/
CompletableFuture<Boolean>
deleteRecursive(ConfigStoreType store, ConfigNodePath path);
/**
* Creates/Updates nodes in the ElasticConfigStore, recursively by creating
* all missing intermediate nodes in the path.
*
* @param store type of store which the appplication wants to access.
* @param path data structure with absolute path to the parent and
* relative path to the node
* @param node recursive data structure with nodetype and value to
* be stored at the node
* @return future that is completed with {@code true} if all the
* nodes under the given path
* including the node at the path could be successfully updated.
* Future will be completed with {@code false} if the node at the
* given path or any parent node
* did not exist //TODO
*/
CompletableFuture<Boolean>
updateRecursive(ConfigStoreType store, ConfigNodePath path,
ConfigNode node);
/**
* Returns a value node or subtree under the given path.
*
* @param store type of store which the appplication wants to access.
* @param path data structure with absolute path to the parent and
* relative path to the node
* @param mode wether to retrive the nodes recursivley or not
* @param filter filtering conditions to be applied on the result
* list of nodes.
* @return future that will be completed either with a value node
* or a recursive data structure containing the subtree;
* will be completed with {@code null} if
* after applying the filter, the result is an empty list of nodes.
* Future will be completed with a {@code FailedException} if path
* does not point to a valid node.
*
*/
CompletableFuture<ConfigNode>
getNode(ConfigStoreType store, ConfigNodePath path,
TraversalMode mode, ConfigFilter filter);
/**
* Returns the number of children under the given path, excluding
* the node at the path.
*
* @param store type of store which the appplication wants to access.
* @param path data structure with absolute path to the parent and
* relative path to the node
* @param filter how the value nodes should be filtered
* @return future that will be completed with {@code Integer}, the
* count of the children
* after applying the filtering conditions as well.
* Future will be completed with a {@code FailedException} if path
* does not point to a valid node
*/
CompletableFuture<Integer>
getNumberOfChildren(ConfigStoreType store,
ConfigNodePath path, ConfigFilter filter);
//TODO
/**
* Filter
* What should be the filtering conditions?
* a list of keys? node attribute/s? level1 children?
* Merge Trees
* add sub tree
* delete subtree
* update sub tree
* get sub tree
* How to handle big subtrees?
* how many levels? how many results to limit?
*/
}
\ No newline at end of file
/*
* Copyright 2015-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.incubator.elasticcfg;
import org.onosproject.store.StoreDelegate;
/**
* Proprietary configuration store delegate abstraction.
*/
public interface ElasticConfigStoreDelegate extends StoreDelegate<ElasticConfigEvent> {
}
/*
* Copyright 2016-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.incubator.elasticcfg;
/**
* Exceptions for use by the {@code PropConfigService}.
*/
public class FailedException extends RuntimeException {
/**
* Constructs a new runtime exception with no error message.
*/
public FailedException() {
super();
}
/**
* Constructs a new runtime exception with the given error message.
*
* @param message error message
*/
public FailedException(String message) {
super(message);
}
}
\ No newline at end of file
/*
* Copyright 2016-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.incubator.elasticcfg;
/**
* Exceptions for use by the {@code ConfigFilter}.
*/
public class InvalidFilterException extends RuntimeException {
/**
* Constructs a new runtime exception with no error message.
*/
public InvalidFilterException() {
super();
}
/**
* Constructs a new runtime exception with the given error message.
*
* @param message error message
*/
public InvalidFilterException(String message) {
super(message);
}
}
\ No newline at end of file
/*
* Copyright 2016-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.incubator.elasticcfg;
/**
* Node Type representation for applications.
* Indicates the possible node types that would be communicated by/to the applications.
*/
public enum NodeType {
/**
* ROOT node of the tree.
*/
ROOT,
/**
* LEAF node on the tree.
*/
LEAF,
/**
* Subtree as a recursive data structure.
*/
COMPOSITE,
}
\ No newline at end of file
/*
* Copyright 2016-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.incubator.elasticcfg;
/**
* Traversal Modes for the PropConfig Stores.
*/
public enum TraversalMode {
/**
* Tree will be traversed recursively.
*/
RECURSIVE,
/**
* Tree will NOT be traversed.
*/
NON_RECURSIVE;
}
\ No newline at end of file
/*
* Copyright 2015-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Abstractions for interacting with the elastic configuration subsystem.
*/
package org.onosproject.incubator.elasticcfg;