Class SingleMemoryAllocatorFactory
java.lang.Object
org.apache.druid.frame.allocation.SingleMemoryAllocatorFactory
- All Implemented Interfaces:
MemoryAllocatorFactory
Wraps a single
MemoryAllocator.
The same instance is returned on each call to newAllocator(), after validating that it is 100% free.
Calling newAllocator() before freeing all previously-allocated memory leads to an IllegalStateException.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongCapacity of allocators returned byMemoryAllocatorFactory.newAllocator().Returns a new allocator with capacityMemoryAllocatorFactory.allocatorCapacity().
-
Constructor Details
-
SingleMemoryAllocatorFactory
-
-
Method Details
-
newAllocator
Description copied from interface:MemoryAllocatorFactoryReturns a new allocator with capacityMemoryAllocatorFactory.allocatorCapacity().- Specified by:
newAllocatorin interfaceMemoryAllocatorFactory
-
allocatorCapacity
public long allocatorCapacity()Description copied from interface:MemoryAllocatorFactoryCapacity of allocators returned byMemoryAllocatorFactory.newAllocator().- Specified by:
allocatorCapacityin interfaceMemoryAllocatorFactory
-