diff options
author | Ashlee Young <ashlee@wildernessvoice.com> | 2015-12-01 05:49:27 -0800 |
---|---|---|
committer | Ashlee Young <ashlee@wildernessvoice.com> | 2015-12-01 05:49:27 -0800 |
commit | e63291850fd0795c5700e25e67e5dee89ba54c5f (patch) | |
tree | 9707289536ad95bb739c9856761ad43275e07d8c /framework/src/onos/core/api/src/main/java/org/onosproject/net/newresource/ResourceAdminService.java | |
parent | 671823e12bc13be9a8b87a5d7de33da1bb7a44e8 (diff) |
onos commit hash c2999f30c69e50df905a9d175ef80b3f23a98514
Change-Id: I2bb8562c4942b6d6a6d60b663db2e17540477b81
Signed-off-by: Ashlee Young <ashlee@wildernessvoice.com>
Diffstat (limited to 'framework/src/onos/core/api/src/main/java/org/onosproject/net/newresource/ResourceAdminService.java')
-rw-r--r-- | framework/src/onos/core/api/src/main/java/org/onosproject/net/newresource/ResourceAdminService.java | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/newresource/ResourceAdminService.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/newresource/ResourceAdminService.java index cdcd4072..28c429bd 100644 --- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/newresource/ResourceAdminService.java +++ b/framework/src/onos/core/api/src/main/java/org/onosproject/net/newresource/ResourceAdminService.java @@ -16,8 +16,8 @@ package org.onosproject.net.newresource; import com.google.common.annotations.Beta; +import com.google.common.collect.ImmutableList; -import java.util.Arrays; import java.util.List; /** @@ -26,50 +26,42 @@ import java.util.List; @Beta public interface ResourceAdminService { /** - * Registers resources as the children of the parent resource path. + * Registers the specified resources. * - * @param parent parent resource path under which the resource are registered - * @param children resources to be registered as the children of the parent - * @param <T> type of resources + * @param resources resources to be registered * @return true if registration is successfully done, false otherwise. Registration * succeeds when each resource is not registered or unallocated. */ - default <T> boolean registerResources(ResourcePath parent, T... children) { - return registerResources(parent, Arrays.asList(children)); + default boolean registerResources(ResourcePath... resources) { + return registerResources(ImmutableList.copyOf(resources)); } /** - * Registers resources as the children of the parent resource path. + * Registers the specified resources. * - * @param parent parent resource path under which the resource are registered - * @param children resources to be registered as the children of the parent - * @param <T> type of resources + * @param resources resources to be registered * @return true if registration is successfully done, false otherwise. Registration * succeeds when each resource is not registered or unallocated. */ - <T> boolean registerResources(ResourcePath parent, List<T> children); + boolean registerResources(List<ResourcePath> resources); /** - * Unregisters resources as the children of the parent resource path. + * Unregisters the specified resources. * - * @param parent parent resource path under which the resource are unregistered - * @param children resources to be unregistered as the children of the parent - * @param <T> type of resources + * @param resources resources to be unregistered * @return true if unregistration is successfully done, false otherwise. Unregistration * succeeds when each resource is not registered or unallocated. */ - default <T> boolean unregisterResources(ResourcePath parent, T... children) { - return unregisterResources(parent, Arrays.asList(children)); + default boolean unregisterResources(ResourcePath... resources) { + return unregisterResources(ImmutableList.copyOf(resources)); } /** - * Unregisters resources as the children of the parent resource path. + * Unregisters the specified resources. * - * @param parent parent resource path under which the resource are unregistered - * @param children resources to be unregistered as the children of the parent - * @param <T> type of resources + * @param resources resources to be unregistered * @return true if unregistration is successfully done, false otherwise. Unregistration * succeeds when each resource is not registered or unallocated. */ - <T> boolean unregisterResources(ResourcePath parent, List<T> children); + boolean unregisterResources(List<ResourcePath> resources); } |