@Override public Boolean resolveParameterValue(Message<?> message) { return CurrentUnitOfWork.map(unitOfWork -> !(unitOfWork instanceof BatchingUnitOfWork<?>) || ((BatchingUnitOfWork<?>) unitOfWork).isLastMessage(message)).orElse(true); }
/** * Checks if the message being processed now is the last of the batch being processed in this unit of work. * * @return {@code true} if the message is the last of this batch, {@code false} otherwise */ public boolean isLastMessage() { return isLastMessage(getMessage()); }
tokenStore.extendClaim(getName(), unitOfWork.getResource(segmentIdResourceKey)); if (!(unitOfWork instanceof BatchingUnitOfWork) || ((BatchingUnitOfWork) unitOfWork).isLastMessage()) { unitOfWork.onPrepareCommit(uow -> tokenStore.storeToken(unitOfWork.getResource(lastTokenResourceKey), builder.name,
@Override public Boolean resolveParameterValue(Message<?> message) { return CurrentUnitOfWork.map(unitOfWork -> !(unitOfWork instanceof BatchingUnitOfWork<?>) || ((BatchingUnitOfWork<?>) unitOfWork).isLastMessage(message)).orElse(true); }
/** * Checks if the message being processed now is the last of the batch being processed in this unit of work. * * @return {@code true} if the message is the last of this batch, {@code false} otherwise */ public boolean isLastMessage() { return isLastMessage(getMessage()); }
@Override public Boolean resolveParameterValue(Message<?> message) { return CurrentUnitOfWork.map(unitOfWork -> !(unitOfWork instanceof BatchingUnitOfWork<?>) || ((BatchingUnitOfWork<?>) unitOfWork).isLastMessage(message)).orElse(true); }
/** * Checks if the message being processed now is the last of the batch being processed in this unit of work. * * @return {@code true} if the message is the last of this batch, {@code false} otherwise */ public boolean isLastMessage() { return isLastMessage(getMessage()); }
tokenStore.extendClaim(getName(), unitOfWork.getResource(segmentIdResourceKey)); if (!(unitOfWork instanceof BatchingUnitOfWork) || ((BatchingUnitOfWork) unitOfWork).isLastMessage()) { unitOfWork.onPrepareCommit(uow -> tokenStore.storeToken(unitOfWork.getResource(lastTokenResourceKey), name,
tokenStore.extendClaim(getName(), unitOfWork.getResource(segmentIdResourceKey)); if (!(unitOfWork instanceof BatchingUnitOfWork) || ((BatchingUnitOfWork) unitOfWork).isLastMessage()) { unitOfWork.onPrepareCommit(uow -> tokenStore.storeToken(unitOfWork.getResource(lastTokenResourceKey), builder.name,