Class FlowController

java.lang.Object
com.swiftmq.swiftlet.queue.FlowController

public abstract class FlowController extends Object
Abstract base class for flow controllers. A flow controller computes a delay, dependent on throughput, queue backlog, and transaction size.
Author:
IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
  • Field Details

    • receiverCount

      protected final AtomicInteger receiverCount
    • queueSize

      protected final AtomicInteger queueSize
    • lastDelay

      protected final AtomicLong lastDelay
    • sentCount

      protected final AtomicLong sentCount
    • sentCountCalls

      protected final AtomicLong sentCountCalls
    • receiveCount

      protected final AtomicLong receiveCount
    • receiveCountCalls

      protected final AtomicLong receiveCountCalls
    • timestamp

      protected final AtomicLong timestamp
  • Constructor Details

    • FlowController

      public FlowController()
  • Method Details

    • getStartQueueSize

      public int getStartQueueSize()
      Returns the FC start queue size
      Returns:
      start queue size
    • setQueueSize

      public void setQueueSize(int queueSize)
      Sets the queue size (message count).
      Parameters:
      queueSize - queue size.
    • setReceiverCount

      public void setReceiverCount(int count)
      Sets the receiver count.
      Parameters:
      count - receiver count.
    • setReceiveMessageCount

      public void setReceiveMessageCount(int count)
      Sets the receive message count.
      Parameters:
      count - receive message count.
    • setSentMessageCount

      public void setSentMessageCount(int count)
      Sets the sent message count.
      Parameters:
      count - sent message count.
    • getLastDelay

      public long getLastDelay()
      Returns the last computed fc delay.
      Returns:
      delay.
    • getNewDelay

      public abstract long getNewDelay()
      Computes and returns a new delay.
      Returns:
      delay.
    • toString

      public String toString()
      Overrides:
      toString in class Object