test_class.declarator: KNOWN_ENTITY_ID = ThingId.generateRandom()
test_class.modifier: private static final
test_class.original_string: private static final ThingId KNOWN_ENTITY_ID = ThingId.generateRandom();
test_class.type: ThingId
test_class.var_name: KNOWN_ENTITY_ID
test_class.declarator: actorSystem
test_class.modifier: private static
test_class.original_string: private static ActorSystem actorSystem;
test_class.type: ActorSystem
test_class.var_name: actorSystem
test_class.declarator: acknowledgementConfig
test_class.modifier: private static
test_class.original_string: private static AcknowledgementConfig acknowledgementConfig;
test_class.type: AcknowledgementConfig
test_class.var_name: acknowledgementConfig
test_class.declarator: testName = new TestName()
test_class.modifier: @Rule
      public final
test_class.original_string: @Rule
      public final TestName testName = new TestName();
test_class.type: TestName
test_class.var_name: testName
test_class.declarator: softly = new JUnitSoftAssertions()
test_class.modifier: @Rule
      public final
test_class.original_string: @Rule
      public final JUnitSoftAssertions softly = new JUnitSoftAssertions();
test_class.type: JUnitSoftAssertions
test_class.var_name: softly
test_class.declarator: actorContext
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ActorContext actorContext;
test_class.type: ActorContext
test_class.var_name: actorContext
test_class.declarator: testProbe
test_class.modifier: private
test_class.original_string: private TestProbe testProbe;
test_class.type: TestProbe
test_class.var_name: testProbe
test_class.file: services/models/acks/src/test/java/org/eclipse/ditto/services/models/acks/AcknowledgementForwarderActorStarterTest.java
test_class.identifier: AcknowledgementForwarderActorStarterTest
test_case.body: @Test
      public void startForwarderActorSuccessfully() {
          final DittoHeaders dittoHeaders = DittoHeaders.newBuilder()
                  .correlationId(testName.getMethodName())
                  .acknowledgementRequest(AcknowledgementRequest.of(DittoAcknowledgementLabel.TWIN_PERSISTED),
                          AcknowledgementRequest.of(AcknowledgementLabel.of("my-ack")))
                  .build();
  
          final AcknowledgementForwarderActorStarter underTest = getActorStarter(dittoHeaders);
  
          softly.assertThat(underTest.get()).isPresent();
      }
test_case.class_method_signature: AcknowledgementForwarderActorStarterTest.startForwarderActorSuccessfully()
test_case.full_signature: @Test public void startForwarderActorSuccessfully()
test_case.identifier: startForwarderActorSuccessfully
test_case.invocations: build acknowledgementRequest correlationId newBuilder getMethodName of of of getActorStarter isPresent assertThat get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void startForwarderActorSuccessfully()
focal_class.declarator: PREFIX_COUNTER_SEPARATOR = "#"
focal_class.modifier: private static final
focal_class.original_string: private static final String PREFIX_COUNTER_SEPARATOR = "#";
focal_class.type: String
focal_class.var_name: PREFIX_COUNTER_SEPARATOR
focal_class.declarator: LOGGER = DittoLoggerFactory.getLogger(AcknowledgementForwarderActorStarter.class)
focal_class.modifier: private static final
focal_class.original_string: private static final DittoLogger LOGGER = DittoLoggerFactory.getLogger(AcknowledgementForwarderActorStarter.class);
focal_class.type: DittoLogger
focal_class.var_name: LOGGER
focal_class.declarator: actorContext
focal_class.modifier: private final
focal_class.original_string: private final ActorContext actorContext;
focal_class.type: ActorContext
focal_class.var_name: actorContext
focal_class.declarator: entityId
focal_class.modifier: private final
focal_class.original_string: private final EntityIdWithType entityId;
focal_class.type: EntityIdWithType
focal_class.var_name: entityId
focal_class.declarator: signal
focal_class.modifier: private final
focal_class.original_string: private final Signal<?> signal;
focal_class.type: Signal<?>
focal_class.var_name: signal
focal_class.declarator: dittoHeaders
focal_class.modifier: private final
focal_class.original_string: private final DittoHeaders dittoHeaders;
focal_class.type: DittoHeaders
focal_class.var_name: dittoHeaders
focal_class.declarator: acknowledgementRequests
focal_class.modifier: private final
focal_class.original_string: private final Set<AcknowledgementRequest> acknowledgementRequests;
focal_class.type: Set<AcknowledgementRequest>
focal_class.var_name: acknowledgementRequests
focal_class.declarator: acknowledgementConfig
focal_class.modifier: private final
focal_class.original_string: private final AcknowledgementConfig acknowledgementConfig;
focal_class.type: AcknowledgementConfig
focal_class.var_name: acknowledgementConfig
focal_class.file: services/models/acks/src/main/java/org/eclipse/ditto/services/models/acks/AcknowledgementForwarderActorStarter.java
focal_class.identifier: AcknowledgementForwarderActorStarter
focal_class.interfaces: implements Supplier<Optional<ActorRef>>
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.AcknowledgementForwarderActorStarter(final ActorContext context,
              final EntityIdWithType entityId,
              final Signal<?> signal,
              final AcknowledgementConfig acknowledgementConfig)
focal_class.full_signature: private  AcknowledgementForwarderActorStarter(final ActorContext context,
              final EntityIdWithType entityId,
              final Signal<?> signal,
              final AcknowledgementConfig acknowledgementConfig)
focal_class.identifier: AcknowledgementForwarderActorStarter
focal_class.modifiers: private
focal_class.parameters: (final ActorContext context,
              final EntityIdWithType entityId,
              final Signal<?> signal,
              final AcknowledgementConfig acknowledgementConfig)
focal_class.signature:  AcknowledgementForwarderActorStarter(final ActorContext context,
              final EntityIdWithType entityId,
              final Signal<?> signal,
              final AcknowledgementConfig acknowledgementConfig)
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.getInstance(final ActorContext context,
              final EntityIdWithType entityId,
              final Signal<?> signal,
              final AcknowledgementConfig acknowledgementConfig)
focal_class.full_signature: static AcknowledgementForwarderActorStarter getInstance(final ActorContext context,
              final EntityIdWithType entityId,
              final Signal<?> signal,
              final AcknowledgementConfig acknowledgementConfig)
focal_class.identifier: getInstance
focal_class.modifiers: static
focal_class.parameters: (final ActorContext context,
              final EntityIdWithType entityId,
              final Signal<?> signal,
              final AcknowledgementConfig acknowledgementConfig)
focal_class.return: AcknowledgementForwarderActorStarter
focal_class.signature: AcknowledgementForwarderActorStarter getInstance(final ActorContext context,
              final EntityIdWithType entityId,
              final Signal<?> signal,
              final AcknowledgementConfig acknowledgementConfig)
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.get()
focal_class.full_signature: @Override public Optional<ActorRef> get()
focal_class.identifier: get
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Optional<ActorRef>
focal_class.signature: Optional<ActorRef> get()
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.getConflictFree()
focal_class.full_signature: public Optional<String> getConflictFree()
focal_class.identifier: getConflictFree
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Optional<String>
focal_class.signature: Optional<String> getConflictFree()
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.joinPrefixAndCounter(final String prefix, final int counter)
focal_class.full_signature: private String joinPrefixAndCounter(final String prefix, final int counter)
focal_class.identifier: joinPrefixAndCounter
focal_class.modifiers: private
focal_class.parameters: (final String prefix, final int counter)
focal_class.return: String
focal_class.signature: String joinPrefixAndCounter(final String prefix, final int counter)
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.parseCorrelationId(final DittoHeaders dittoHeaders)
focal_class.full_signature: private Pair<String, Integer> parseCorrelationId(final DittoHeaders dittoHeaders)
focal_class.identifier: parseCorrelationId
focal_class.modifiers: private
focal_class.parameters: (final DittoHeaders dittoHeaders)
focal_class.return: Pair<String, Integer>
focal_class.signature: Pair<String, Integer> parseCorrelationId(final DittoHeaders dittoHeaders)
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.startAckForwarderActor(final DittoHeaders dittoHeaders)
focal_class.full_signature: private ActorRef startAckForwarderActor(final DittoHeaders dittoHeaders)
focal_class.identifier: startAckForwarderActor
focal_class.modifiers: private
focal_class.parameters: (final DittoHeaders dittoHeaders)
focal_class.return: ActorRef
focal_class.signature: ActorRef startAckForwarderActor(final DittoHeaders dittoHeaders)
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.getDuplicateCorrelationIdException(final Throwable cause)
focal_class.full_signature: private DittoRuntimeException getDuplicateCorrelationIdException(final Throwable cause)
focal_class.identifier: getDuplicateCorrelationIdException
focal_class.modifiers: private
focal_class.parameters: (final Throwable cause)
focal_class.return: DittoRuntimeException
focal_class.signature: DittoRuntimeException getDuplicateCorrelationIdException(final Throwable cause)
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.declineAllNonDittoAckRequests(final DittoRuntimeException dittoRuntimeException)
focal_class.full_signature: private void declineAllNonDittoAckRequests(final DittoRuntimeException dittoRuntimeException)
focal_class.identifier: declineAllNonDittoAckRequests
focal_class.modifiers: private
focal_class.parameters: (final DittoRuntimeException dittoRuntimeException)
focal_class.return: void
focal_class.signature: void declineAllNonDittoAckRequests(final DittoRuntimeException dittoRuntimeException)
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.getNack(final AcknowledgementLabel label,
              final DittoRuntimeException dittoRuntimeException)
focal_class.full_signature: private Acknowledgement getNack(final AcknowledgementLabel label,
              final DittoRuntimeException dittoRuntimeException)
focal_class.identifier: getNack
focal_class.modifiers: private
focal_class.parameters: (final AcknowledgementLabel label,
              final DittoRuntimeException dittoRuntimeException)
focal_class.return: Acknowledgement
focal_class.signature: Acknowledgement getNack(final AcknowledgementLabel label,
              final DittoRuntimeException dittoRuntimeException)
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.isNotBuiltIn(final AcknowledgementRequest request)
focal_class.full_signature: static boolean isNotBuiltIn(final AcknowledgementRequest request)
focal_class.identifier: isNotBuiltIn
focal_class.modifiers: static
focal_class.parameters: (final AcknowledgementRequest request)
focal_class.return: boolean
focal_class.signature: boolean isNotBuiltIn(final AcknowledgementRequest request)
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.isNotTwinPersisted(final AcknowledgementRequest request)
focal_class.full_signature: static boolean isNotTwinPersisted(final AcknowledgementRequest request)
focal_class.identifier: isNotTwinPersisted
focal_class.modifiers: static
focal_class.parameters: (final AcknowledgementRequest request)
focal_class.return: boolean
focal_class.signature: boolean isNotTwinPersisted(final AcknowledgementRequest request)
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.isNotLiveResponse(final AcknowledgementRequest request)
focal_class.full_signature: static boolean isNotLiveResponse(final AcknowledgementRequest request)
focal_class.identifier: isNotLiveResponse
focal_class.modifiers: static
focal_class.parameters: (final AcknowledgementRequest request)
focal_class.return: boolean
focal_class.signature: boolean isNotLiveResponse(final AcknowledgementRequest request)
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.isLiveSignal(final Signal<?> signal)
focal_class.full_signature: static boolean isLiveSignal(final Signal<?> signal)
focal_class.identifier: isLiveSignal
focal_class.modifiers: static
focal_class.parameters: (final Signal<?> signal)
focal_class.return: boolean
focal_class.signature: boolean isLiveSignal(final Signal<?> signal)
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.hasEffectiveAckRequests(final Signal<?> signal)
focal_class.full_signature: static boolean hasEffectiveAckRequests(final Signal<?> signal)
focal_class.identifier: hasEffectiveAckRequests
focal_class.modifiers: static
focal_class.parameters: (final Signal<?> signal)
focal_class.return: boolean
focal_class.signature: boolean hasEffectiveAckRequests(final Signal<?> signal)
focal_class.class_method_signature: AcknowledgementForwarderActorStarter.isNumber(final String string, final int startIndex)
focal_class.full_signature: private static boolean isNumber(final String string, final int startIndex)
focal_class.identifier: isNumber
focal_class.modifiers: private static
focal_class.parameters: (final String string, final int startIndex)
focal_class.return: boolean
focal_class.signature: boolean isNumber(final String string, final int startIndex)
focal_method.body: @Override
      public Optional<ActorRef> get() {
          ActorRef actorRef = null;
          if (hasEffectiveAckRequests(signal)) {
              try {
                  actorRef = startAckForwarderActor(dittoHeaders);
              } catch (final InvalidActorNameException e) {
                  // In case that the actor with that name already existed, the correlation-id was already used recently:
                  declineAllNonDittoAckRequests(getDuplicateCorrelationIdException(e));
              }
          }
          return Optional.ofNullable(actorRef);
      }
focal_method.class_method_signature: AcknowledgementForwarderActorStarter.get()
focal_method.full_signature: @Override public Optional<ActorRef> get()
focal_method.identifier: get
focal_method.invocations: hasEffectiveAckRequests startAckForwarderActor declineAllNonDittoAckRequests getDuplicateCorrelationIdException ofNullable
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: Optional<ActorRef>
focal_method.signature: Optional<ActorRef> get()