Interface NodeAllocator
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
BinPackingNodeAllocatorService
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionacquire(NodeRequirements nodeRequirements, io.airlift.units.DataSize memoryRequirement, TaskExecutionClass executionClass) Requests acquisition of node.voidclose()
-
Method Details
-
acquire
NodeAllocator.NodeLease acquire(NodeRequirements nodeRequirements, io.airlift.units.DataSize memoryRequirement, TaskExecutionClass executionClass) Requests acquisition of node. Obtained node can be obtained viaNodeAllocator.NodeLease.getNode()method. The node may not be available immediately. Calling party needs to wait until future returned is done. It is obligatory for the calling party to release all the leases they obtained viaNodeAllocator.NodeLease.release(). -
close
void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-