private PartitionReceiverImpl(MessagingFactory factory,
final String eventHubName,
final String consumerGroupName,
final String partitionId,
final EventPositionImpl eventPosition,
final Long epoch,
final boolean isEpochReceiver,
final ReceiverOptions receiverOptions,
final ScheduledExecutorService executor) {
super("PartitionReceiverImpl".concat(StringUtil.getRandomString()), null, executor);
this.underlyingFactory = factory;
this.eventHubName = eventHubName;
this.consumerGroupName = consumerGroupName;
this.partitionId = partitionId;
this.eventPosition = eventPosition;
this.epoch = epoch;
this.isEpochReceiver = isEpochReceiver;
this.receiveHandlerLock = new Object();
this.receiverOptions = receiverOptions;
this.runtimeInformation = (this.receiverOptions != null && this.receiverOptions.getReceiverRuntimeMetricEnabled())
? new ReceiverRuntimeInformation(partitionId)
: null;
this.currentEventPosition = EventPosition.fromStartOfStream();
}