Package org.apache.sysds.runtime.instructions.ooc

# Class OOCInstruction.OOCMatrixBlockTracker

java.lang.Object
org.apache.sysds.runtime.instructions.ooc.OOCInstruction.OOCMatrixBlockTracker

Enclosing class:
  OOCInstruction

public static class OOCInstruction.OOCMatrixBlockTracker extends Object
Tracks blocks and their counts to enable early emission once all blocks for a given index are processed.

## Constructor Summary

Constructors
Constructor
Description
`OOCMatrixBlockTracker(long emitThreshold)`

## Method Summary

Modifier and Type
Method
Description
`MatrixBlock`
`get(Long idx)`
`boolean`
`incrementCount(Long idx)`
`boolean`
`putAndIncrementCount(Long idx, MatrixBlock block)`
Adds or updates a block for the given index and updates its internal count.
`void`
`putAndInitCount(Long idx, MatrixBlock block)`
`void`
`remove(Long idx)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### OOCMatrixBlockTracker

public OOCMatrixBlockTracker(long emitThreshold)

## Method Details

### putAndIncrementCount

public boolean putAndIncrementCount(Long idx, MatrixBlock block)
Adds or updates a block for the given index and updates its internal count.

Parameters:
  `idx` - block index
  `block` - MatrixBlock
Returns:
  true if the block count reached the threshold (ready to emit), false otherwise

### incrementCount

public boolean incrementCount(Long idx)

### putAndInitCount

public void putAndInitCount(Long idx, MatrixBlock block)

### get

public MatrixBlock get(Long idx)

### remove

public void remove(Long idx)