public interface ResourceAllocator
Modifier and Type | Method and Description |
---|---|
void |
acquire(scala.collection.Seq<String> addrs)
Acquire a sequence of resource addresses (to a launched task), these addresses must be
available.
|
scala.collection.Seq<String> |
assignedAddrs()
Sequence of currently assigned resource addresses.
|
scala.collection.Seq<String> |
availableAddrs()
Sequence of currently available resource addresses.
|
void |
release(scala.collection.Seq<String> addrs)
Release a sequence of resource addresses, these addresses must have been assigned.
|
scala.collection.Seq<String> |
resourceAddresses() |
String |
resourceName() |
int |
slotsPerAddress() |
void acquire(scala.collection.Seq<String> addrs)
addrs
- (undocumented)scala.collection.Seq<String> assignedAddrs()
With slotsPerAddress
greater than 1, assignedAddrs
can contain duplicate addresses
e.g. with slotsPerAddress
== 2, assignedAddrs for addresses 0 and 1 can look like
Seq("0", "1", "1"), where address 0 was assigned once, and 1 was assigned twice.
scala.collection.Seq<String> availableAddrs()
With slotsPerAddress
greater than 1, availableAddrs
can contain duplicate addresses
e.g. with slotsPerAddress
== 2, availableAddrs for addresses 0 and 1 can look like
Seq("0", "0", "1"), where address 0 has two assignments available, and 1 has one.
void release(scala.collection.Seq<String> addrs)
addrs
- (undocumented)scala.collection.Seq<String> resourceAddresses()
String resourceName()
int slotsPerAddress()