Class UNICAST4

All Implemented Interfaces:
Lifecycle, AgeOutCache.Handler<Address>

public class UNICAST4 extends ReliableUnicast
New unicast protocol based on fixed-size xmit windows and message ACKs
Details: https://issues.redhat.com/browse/JGRP-2843
Since:
5.4
Author:
Bela Ban
  • Field Details

    • capacity

      protected int capacity
    • ack_threshold

      protected int ack_threshold
    • add_acks

      protected final IntBinaryOperator add_acks
  • Constructor Details

    • UNICAST4

      public UNICAST4()
  • Method Details

    • getNumBlockings

      public long getNumBlockings()
    • getAvgTimeBlocked

      public AverageMinMax getAvgTimeBlocked()
    • changeCapacity

      public void changeCapacity(int new_capacity)
      Changes the capacity of all buffers, basically by creating new buffers and copying the messages from the old ones. This method is only supposed to be used by perf testing, so DON'T USE!
    • createBuffer

      protected Buffer<Message> createBuffer(long s)
      Specified by:
      createBuffer in class ReliableUnicast
    • capacity

      public int capacity()
    • capacity

      public UNICAST4 capacity(int c)
    • ackThreshold

      public int ackThreshold()
    • ackThreshold

      public UNICAST4 ackThreshold(int t)
    • init

      public void init() throws Exception
      Description copied from class: Protocol
      Called after a protocol has been created and before the protocol is started. Attributes are already set. Other protocols are not yet connected and events cannot yet be sent.
      Specified by:
      init in interface Lifecycle
      Overrides:
      init in class ReliableUnicast
      Throws:
      Exception - Thrown if protocol cannot be initialized successfully. This will cause the ProtocolStack to fail, so the the channel constructor will throw an exception
    • needToSendAck

      protected boolean needToSendAck(ReliableUnicast.Entry e, int num_acks)
      Specified by:
      needToSendAck in class ReliableUnicast