| Package | Description |
|---|---|
| org.onosproject.net.newresource |
Generic network resource model and services for resource allocation and
resource tracking.
|
| Modifier and Type | Field and Description |
|---|---|
static ResourcePath |
ResourcePath.ROOT |
| Modifier and Type | Method and Description |
|---|---|
static ResourcePath |
ResourcePath.child(ResourcePath parent,
Object child) |
ResourcePath |
ResourceAllocation.resource()
Returns the specifier of the resource this allocation uses.
|
| Modifier and Type | Method and Description |
|---|---|
<T> Collection<ResourcePath> |
ResourceStore.getAllocatedResources(ResourcePath parent,
Class<T> cls)
Returns a collection of the resources which are children of the specified parent and
whose type is the specified class.
|
Collection<ResourcePath> |
ResourceStore.getResources(ResourceConsumer consumer)
Returns a collection of the resources allocated to the specified consumer.
|
Optional<ResourcePath> |
ResourcePath.parent()
Returns the parent resource path of this instance.
|
| Modifier and Type | Method and Description |
|---|---|
default List<ResourceAllocation> |
ResourceService.allocate(ResourceConsumer consumer,
ResourcePath... resources)
Transactionally allocates the specified resources to the specified user.
|
default Optional<ResourceAllocation> |
ResourceService.allocate(ResourceConsumer consumer,
ResourcePath resource)
Allocates the specified resource to the specified user.
|
static ResourcePath |
ResourcePath.child(ResourcePath parent,
Object child) |
<T> Collection<ResourcePath> |
ResourceStore.getAllocatedResources(ResourcePath parent,
Class<T> cls)
Returns a collection of the resources which are children of the specified parent and
whose type is the specified class.
|
Optional<ResourceConsumer> |
ResourceStore.getConsumer(ResourcePath resource)
Returns the resource consumer to whom the specified resource is allocated.
|
<T> Collection<ResourceAllocation> |
ResourceService.getResourceAllocations(ResourcePath parent,
Class<T> cls)
Returns allocated resources being as children of the specified parent and being the specified resource type.
|
boolean |
ResourceService.isAvailable(ResourcePath resource)
Returns the availability of the specified resource.
|
<T> boolean |
ResourceAdminService.registerResources(ResourcePath parent,
List<T> children)
Register resources as the children of the parent resource path.
|
default <T> boolean |
ResourceAdminService.registerResources(ResourcePath parent,
T... children)
Register resources as the children of the parent resource path.
|
<T> boolean |
ResourceAdminService.unregisterResources(ResourcePath parent,
List<T> children)
Unregister resources as the children of the parent resource path.
|
default <T> boolean |
ResourceAdminService.unregisterResources(ResourcePath parent,
T... children)
Unregister resources as the children of the parent resource path.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
ResourceStore.allocate(List<ResourcePath> resources,
ResourceConsumer consumer)
Allocates the specified resources to the specified consumer in transactional way.
|
List<ResourceAllocation> |
ResourceService.allocate(ResourceConsumer consumer,
List<ResourcePath> resources)
Transactionally allocates the specified resources to the specified user.
|
boolean |
ResourceStore.register(List<ResourcePath> resources)
Registers the resources in transactional way.
|
boolean |
ResourceStore.release(List<ResourcePath> resources,
List<ResourceConsumer> consumers)
Releases the specified resources allocated to the specified corresponding consumers
in transactional way.
|
boolean |
ResourceStore.unregister(List<ResourcePath> resources)
Unregisters the resources in transactional way.
|
| Constructor and Description |
|---|
ResourceAllocation(ResourcePath resource,
ResourceConsumer consumer)
Creates an instance with the specified subject, resource and consumer.
|
Copyright © 2015. All rights reserved.