Class BlockEntry

java.lang.Object
org.apache.sysds.runtime.ooc.cache.BlockEntry

public final class BlockEntry extends Object
  • Constructor Details

  • Method Details

    • getKey

      public BlockKey getKey()
    • getSize

      public long getSize()
    • getData

      public Object getData()
    • getDataUnsafe

      public Object getDataUnsafe()
    • setDataUnsafe

      public void setDataUnsafe(Object data)
    • getState

      public BlockState getState()
    • isPinned

      public boolean isPinned()
    • getPinCount

      public int getPinCount()
    • addReference

      public int addReference()
    • forget

      public int forget()
    • getReferenceCount

      public int getReferenceCount()
    • getCacheMeta

      public Object getCacheMeta()
    • setCacheMeta

      public void setCacheMeta(Object meta)
    • setState

      public void setState(BlockState state)
    • addRetainHint

      public void addRetainHint(int cnt)
    • addRetainHint

      public void addRetainHint()
    • removeRetainHint

      public void removeRetainHint()
    • getRetainHintCount

      public int getRetainHintCount()
    • clear

      public long clear()
      Tries to clear the underlying data if it is not pinned
      Returns:
      the number of cleared bytes (or 0 if could not clear or data was already cleared)
    • pin

      public int pin()
      Pins the underlying data in memory
      Returns:
      the new number of pins (0 if pin was unsuccessful)
    • fastPin

      public boolean fastPin()
      Tries to increment pin-count if already pinned. Unpinned entries are not affected by this operation. This allows bypassing the global cache lock.
    • unpin

      public boolean unpin()
      Unpins the underlying data
      Returns:
      true if the data is now unpinned
    • fastUnpin

      public boolean fastUnpin()
      Tries to unpin but guarantees that it will not remove the last pin. This allows bypassing the global cache lock.
    • toString

      public String toString()
      Overrides:
      toString in class Object