Class MFC

All Implemented Interfaces:
Lifecycle

public class MFC extends FlowControl
Simple flow control protocol based on a credit system. Each sender has a number of credits (bytes to send). When the credits have been exhausted, the sender blocks. Each receiver also keeps track of how many credits it has received from a sender. When credits for a sender fall below a threshold, the receiver sends more credits to the sender. Works for both unicast and multicast messages.

Note that this protocol must be located towards the top of the stack, or all down_threads from JChannel to this protocol must be set to false ! This is in order to block JChannel.send()/JChannel.down().
This is the second simplified implementation of the same model. The algorithm is sketched out in doc/FlowControl.txt

Author:
Bela Ban
  • Field Details

    • MFC_REPLENISH_HDR

      protected static final FcHeader MFC_REPLENISH_HDR
    • MFC_CREDIT_REQUEST_HDR

      protected static final FcHeader MFC_CREDIT_REQUEST_HDR
    • credits

      protected CreditMap credits
      Maintains credits per member
    • last_credit_request

      protected long last_credit_request
      Last time a credit request was sent. Used to prevent credit request storms
  • Constructor Details

    • MFC

      public MFC()
  • Method Details