Package io.aeron.driver.ext
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.
Interface for loss generators.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanshouldDropFrame(InetSocketAddress address, UnsafeBuffer buffer, int length) Should a frame be dropped?default booleanshouldDropFrame(InetSocketAddress address, UnsafeBuffer buffer, int streamId, int sessionId, int termId, int termOffset, int length) Should a frame be dropped?
-
Method Details
-
shouldDropFrame
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 frametermId- of the incoming frame.termOffset- of the incoming frame.length- of the incoming frame.- Returns:
- true to drop, false to process
-