@Beta
public interface ResourceStore
| Modifier and Type | Method and Description |
|---|---|
boolean |
allocate(List<ResourcePath> resources,
ResourceConsumer consumer)
Allocates the specified resources to the specified consumer in transactional way.
|
<T> Collection<ResourcePath> |
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> |
getConsumer(ResourcePath resource)
Returns the resource consumer to whom the specified resource is allocated.
|
Collection<ResourcePath> |
getResources(ResourceConsumer consumer)
Returns a collection of the resources allocated to the specified consumer.
|
boolean |
register(List<ResourcePath> resources)
Registers the resources in transactional way.
|
boolean |
release(List<ResourcePath> resources,
List<ResourceConsumer> consumers)
Releases the specified resources allocated to the specified corresponding consumers
in transactional way.
|
boolean |
unregister(List<ResourcePath> resources)
Unregisters the resources in transactional way.
|
boolean register(List<ResourcePath> resources)
resources - resources to be registeredboolean unregister(List<ResourcePath> resources)
resources - resources to be unregisteredboolean allocate(List<ResourcePath> resources, ResourceConsumer consumer)
resources - resources to be allocatedconsumer - resource consumer which the resources are allocated toboolean release(List<ResourcePath> resources, List<ResourceConsumer> consumers)
resources - resources to be releasedconsumers - resource consumers to whom the resource allocated toOptional<ResourceConsumer> getConsumer(ResourcePath resource)
resource - resource whose allocated consumer to be returnedCollection<ResourcePath> getResources(ResourceConsumer consumer)
consumer - resource consumer whose allocated resource are searched for<T> Collection<ResourcePath> getAllocatedResources(ResourcePath parent, Class<T> cls)
T - type of the resourceparent - parent of the resources to be returnedcls - class instance of the childrenCopyright © 2015. All rights reserved.