Class OOCCacheManager
java.lang.Object
org.apache.sysds.runtime.ooc.cache.OOCCacheManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic voidforget(long streamId, int blockId) Removes a block from the cache without setting its data to null.static voidstatic OOCCacheSchedulergetCache()static OOCCacheSchedulerReturns the current cache scheduler if already initialized, otherwise null.static OOCIOHandlerhandover(BlockKey key, InMemoryQueueCallback callback) static voidprioritize(BlockKey key, int priority) static voidput(long streamId, int blockId, IndexedMatrixValue value) Store a block in the OOC cache (serialize once)putAndPin(long streamId, int blockId, IndexedMatrixValue value) putAndPinRaw(BlockKey key, Object data, long size) putAndPinRawSourceBacked(BlockKey key, Object data, long size, OOCIOHandler.SourceBlockDescriptor descriptor) putAndPinSourceBacked(long streamId, int blockId, IndexedMatrixValue value, OOCIOHandler.SourceBlockDescriptor descriptor) static voidstatic voidputRawSourceBacked(BlockKey key, Object data, long size, OOCIOHandler.SourceBlockDescriptor descriptor) static voidputSourceBacked(long streamId, int blockId, IndexedMatrixValue value, OOCIOHandler.SourceBlockDescriptor descriptor) Store a source-backed block in the OOC cache and register its source location.requestAnyOf(List<BlockKey> keys, int n, List<BlockKey> sel) requestBlock(long streamId, long blockId) requestBlock(BlockKey key) requestManyBlocks(List<BlockKey> keys) static voidreset()tryRequestBlock(long streamId, long blockId) tryRequestBlock(BlockKey key) tryRequestManyBlocks(List<BlockKey> keys)
-
Constructor Details
-
OOCCacheManager
public OOCCacheManager()
-
-
Method Details
-
reset
public static void reset() -
getCache
-
getCacheIfInitialized
Returns the current cache scheduler if already initialized, otherwise null. This method does not trigger lazy initialization. -
getIOHandler
-
forget
public static void forget(long streamId, int blockId) Removes a block from the cache without setting its data to null. -
forget
-
put
Store a block in the OOC cache (serialize once) -
putSourceBacked
public static void putSourceBacked(long streamId, int blockId, IndexedMatrixValue value, OOCIOHandler.SourceBlockDescriptor descriptor) Store a source-backed block in the OOC cache and register its source location. -
putRawSourceBacked
public static void putRawSourceBacked(BlockKey key, Object data, long size, OOCIOHandler.SourceBlockDescriptor descriptor) -
putAndPin
public static OOCStream.QueueCallback<IndexedMatrixValue> putAndPin(long streamId, int blockId, IndexedMatrixValue value) -
putRaw
-
putAndPinRaw
public static OOCStream.QueueCallback<IndexedMatrixValue> putAndPinRaw(BlockKey key, Object data, long size) -
putAndPinSourceBacked
public static OOCStream.QueueCallback<IndexedMatrixValue> putAndPinSourceBacked(long streamId, int blockId, IndexedMatrixValue value, OOCIOHandler.SourceBlockDescriptor descriptor) -
putAndPinRawSourceBacked
public static OOCStream.QueueCallback<IndexedMatrixValue> putAndPinRawSourceBacked(BlockKey key, Object data, long size, OOCIOHandler.SourceBlockDescriptor descriptor) -
prioritize
-
requestBlock
public static CompletableFuture<OOCStream.QueueCallback<IndexedMatrixValue>> requestBlock(long streamId, long blockId) -
requestBlock
public static CompletableFuture<OOCStream.QueueCallback<IndexedMatrixValue>> requestBlock(BlockKey key) -
tryRequestBlock
public static OOCStream.QueueCallback<IndexedMatrixValue> tryRequestBlock(long streamId, long blockId) -
tryRequestBlock
-
requestManyBlocks
public static CompletableFuture<List<OOCStream.QueueCallback<IndexedMatrixValue>>> requestManyBlocks(List<BlockKey> keys) -
tryRequestManyBlocks
public static List<OOCStream.QueueCallback<IndexedMatrixValue>> tryRequestManyBlocks(List<BlockKey> keys) -
requestAnyOf
public static CompletableFuture<List<OOCStream.QueueCallback<IndexedMatrixValue>>> requestAnyOf(List<BlockKey> keys, int n, List<BlockKey> sel) -
canClaimMemory
public static boolean canClaimMemory() -
handover
public static OOCCacheScheduler.HandoverHandle handover(BlockKey key, InMemoryQueueCallback callback)
-