Class MemoryLimitController

java.lang.Object
org.apache.pulsar.client.impl.MemoryLimitController

public class MemoryLimitController extends Object
  • Constructor Details

    • MemoryLimitController

      public MemoryLimitController(long memoryLimitBytes)
    • MemoryLimitController

      public MemoryLimitController(long memoryLimitBytes, long triggerThreshold, Runnable trigger)
  • Method Details

    • forceReserveMemory

      public void forceReserveMemory(long size)
    • tryReserveMemory

      public boolean tryReserveMemory(long size)
    • reserveMemory

      public void reserveMemory(long size) throws InterruptedException
      Throws:
      InterruptedException
    • releaseMemory

      public void releaseMemory(long size)
    • currentUsage

      public long currentUsage()
    • currentUsagePercent

      public double currentUsagePercent()
    • isMemoryLimited

      public boolean isMemoryLimited()