Class InMemoryQueueCallback
java.lang.Object
org.apache.sysds.runtime.ooc.memory.InMemoryQueueCallback
- All Implemented Interfaces:
AutoCloseable,OOCStream.QueueCallback<IndexedMatrixValue>
public class InMemoryQueueCallback
extends Object
implements OOCStream.QueueCallback<IndexedMatrixValue>
-
Constructor Summary
ConstructorsConstructorDescriptionInMemoryQueueCallback(IndexedMatrixValue result, DMLRuntimeException failure, MemoryAllowance allow, long reservedBytes) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidfail(DMLRuntimeException failure) get()longbooleanisEos()booleankeepOpen()Keeps the callback item pinned in memory until the returned callback is also closed.longvoidtransferOwnershipBlocking(MemoryAllowance allowance) booleantryTransferOwnership(MemoryAllowance allowance)
-
Constructor Details
-
InMemoryQueueCallback
public InMemoryQueueCallback(IndexedMatrixValue result, DMLRuntimeException failure, MemoryAllowance allow, long reservedBytes)
-
-
Method Details
-
get
- Specified by:
getin interfaceOOCStream.QueueCallback<IndexedMatrixValue>
-
keepOpen
Description copied from interface:OOCStream.QueueCallbackKeeps the callback item pinned in memory until the returned callback is also closed.- Specified by:
keepOpenin interfaceOOCStream.QueueCallback<IndexedMatrixValue>
-
fail
- Specified by:
failin interfaceOOCStream.QueueCallback<IndexedMatrixValue>
-
getManagedBytes
public long getManagedBytes() -
tryTransferOwnership
-
transferOwnershipBlocking
-
releaseManagedMemory
public long releaseManagedMemory() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceOOCStream.QueueCallback<IndexedMatrixValue>
-
isEos
public boolean isEos()- Specified by:
isEosin interfaceOOCStream.QueueCallback<IndexedMatrixValue>
-
isFailure
public boolean isFailure()- Specified by:
isFailurein interfaceOOCStream.QueueCallback<IndexedMatrixValue>
-
takeManagedResultForHandover
-