public interface MemoryRequestServer
Modifier and Type | Method and Description |
---|---|
WritableMemory |
request(WritableMemory currentWritableMemory,
long newCapacityBytes)
Request new WritableMemory with the given newCapacityBytes.
|
default void |
requestClose(WritableMemory memToClose)
Request to close the resource, if applicable.
|
void |
requestClose(WritableMemory memToClose,
WritableMemory newMemory)
Request to close the resource, if applicable.
|
WritableMemory request(WritableMemory currentWritableMemory, long newCapacityBytes)
currentWritableMemory
- the current writableMemory of the client. It must be non-null.newCapacityBytes
- The capacity being requested. It must be > the capacity of the currentWritableMemory.default void requestClose(WritableMemory memToClose)
memToClose
- the relevant WritableMemory to be considered for closing. It must be non-null.void requestClose(WritableMemory memToClose, WritableMemory newMemory)
memToClose
- the relevant WritbleMemory to be considered for closing. It must be non-null.newMemory
- the newly allocated WritableMemory.
The newMemory reference is returned from the client for the convenience of the system that
owns the responsibility of memory allocation. It may be null.Copyright © 2015–2024. All rights reserved.