Interface LossGenerator

All Known Implementing Classes:
FixedLossGenerator, MultiGapLossGenerator, RandomLossGenerator
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface LossGenerator
Interface for loss generators.
  • Method Details

    • shouldDropFrame

      boolean shouldDropFrame(InetSocketAddress address, UnsafeBuffer buffer, int length)
      Should a frame be dropped?
      Parameters:
      address - The source address of the frame if inbound or the remote address if outbound.
      buffer - The buffer containing the frame data.
      length - The length of the frame.
      Returns:
      true to drop, false to process
    • shouldDropFrame

      default boolean shouldDropFrame(InetSocketAddress address, UnsafeBuffer buffer, int streamId, int sessionId, int termId, int termOffset, int length)
      Should a frame be dropped?
      Parameters:
      address - The source address of the frame if inbound or the remote address if outbound.
      buffer - The buffer containing the frame data.
      streamId - of the incoming frame.
      sessionId - of the incoming frame
      termId - of the incoming frame.
      termOffset - of the incoming frame.
      length - of the incoming frame.
      Returns:
      true to drop, false to process