Java Code Examples for io.aeron.ExclusivePublication#maxPayloadLength()
The following examples show how to use
io.aeron.ExclusivePublication#maxPayloadLength() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GatewayPublication.java From artio with Apache License 2.0 | 5 votes |
public GatewayPublication( final ExclusivePublication dataPublication, final AtomicCounter fails, final IdleStrategy idleStrategy, final Clock clock, final int maxClaimAttempts) { super(maxClaimAttempts, idleStrategy, fails, dataPublication); this.clock = clock; this.maxPayloadLength = dataPublication.maxPayloadLength(); this.maxInitialBodyLength = maxPayloadLength - FRAMED_MESSAGE_SIZE; }
Example 2
Source File: FixReplayerSession.java From artio with Apache License 2.0 | 4 votes |
FixReplayerSession( final BufferClaim bufferClaim, final IdleStrategy idleStrategy, final ReplayHandler replayHandler, final int maxClaimAttempts, final LongHashSet gapFillMessageTypes, final ExclusivePublication publication, final EpochClock clock, final int beginSeqNo, final int endSeqNo, final long connectionId, final long sessionId, final int sequenceIndex, final ReplayQuery replayQuery, final String message, final ErrorHandler errorHandler, final GapFillEncoder gapFillEncoder, final Formatters formatters, final AtomicCounter bytesInBuffer, final int maxBytesInBuffer, final UtcTimestampEncoder utcTimestampEncoder) { super(connectionId, bufferClaim, idleStrategy, maxClaimAttempts, publication, replayQuery, beginSeqNo, endSeqNo, sessionId, sequenceIndex); this.replayHandler = replayHandler; this.gapFillMessageTypes = gapFillMessageTypes; this.message = message; this.errorHandler = errorHandler; this.gapFillEncoder = gapFillEncoder; this.formatters = formatters; this.maxBytesInBuffer = maxBytesInBuffer; this.bytesInBuffer = bytesInBuffer; sequenceNumberExtractor = new SequenceNumberExtractor(errorHandler); lastSeqNo = beginSeqNo - 1; possDupEnabler = new PossDupEnabler( utcTimestampEncoder, bufferClaim, this::claimMessageBuffer, this::onPreCommit, this::onIllegalState, this::onException, clock, publication.maxPayloadLength(), LogTag.FIX_MESSAGE); state = State.REPLAYING; }