public Sequence createInboundSequence(final String sequenceId, final String strId, final long expirationTime) throws DuplicateSequenceException {
final long actualSessions = actualConcurrentInboundSequences.incrementAndGet();
if (maxConcurrentInboundSequences >= 0) {
if (maxConcurrentInboundSequences < actualSessions) {
actualConcurrentInboundSequences.decrementAndGet();
throw new RxRuntimeException(LocalizationMessages.WSRM_1156_MAX_CONCURRENT_SESSIONS_REACHED(maxConcurrentInboundSequences));
}
}
PersistentSequenceData data = PersistentSequenceData.newInstance(this, cm, uniqueEndpointId, sequenceId, PersistentSequenceData.SequenceType.Inbound, strId, expirationTime, Sequence.State.CREATED, false, InboundSequence.INITIAL_LAST_MESSAGE_ID, currentTimeInMillis(), 0L);
return registerSequence(new InboundSequence(data, inboundQueueBuilder, this), data.getBoundSequenceId());