Skip to content

Commit

Permalink
mark ClientDispatcher as internal
Browse files Browse the repository at this point in the history
  • Loading branch information
geomagilles committed Dec 27, 2023
1 parent 0e60a67 commit a8648dc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ import io.infinitic.common.exceptions.thisShouldNotHappen
import io.infinitic.workflows.SendChannel
import java.util.concurrent.CompletableFuture

internal class DeferredChannel<R : SendChannel<*>>(private val channel: R) : Deferred<R> {
class DeferredChannel<R : SendChannel<*>> internal constructor(
private val channel: R
) : Deferred<R> {

override fun cancelAsync(): CompletableFuture<Unit> {
thisShouldNotHappen()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ import io.infinitic.common.exceptions.thisShouldNotHappen
import io.infinitic.common.workflows.data.channels.SignalId
import java.util.concurrent.CompletableFuture

internal class DeferredSend<R : Any?>(internal val signalId: SignalId) : Deferred<R> {
class DeferredSend<R : Any?> internal constructor(
internal val signalId: SignalId
) : Deferred<R> {

override fun cancelAsync(): CompletableFuture<Unit> {
thisShouldNotHappen()
Expand All @@ -41,7 +43,8 @@ internal class DeferredSend<R : Any?>(internal val signalId: SignalId) : Deferre
// also we do not apply the join method
// in order to send asynchronously the message
// despite the synchronous syntax: workflow.channel
@Suppress("UNCHECKED_CAST") override fun await(): R = Unit as R
@Suppress("UNCHECKED_CAST")
override fun await(): R = Unit as R

override val id: String = signalId.toString()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import io.infinitic.common.proxies.RequestByWorkflowTag
import io.infinitic.common.workflows.data.methodRuns.MethodRunId
import io.infinitic.common.workflows.data.workflows.WorkflowName

class ExistingDeferredWorkflow<R>(
class ExistingDeferredWorkflow<R> internal constructor(
internal val workflowName: WorkflowName,
internal val requestBy: RequestBy,
internal val methodName: MethodName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import io.infinitic.common.proxies.RequestByWorkflowId
import io.infinitic.common.workflows.data.workflows.WorkflowId
import io.infinitic.common.workflows.data.workflows.WorkflowName

class NewDeferredWorkflow<R>(
class NewDeferredWorkflow<R> internal constructor(
internal val workflowName: WorkflowName,
internal val methodName: MethodName,
internal val methodReturnClass: Class<R>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ import java.util.concurrent.CompletableFuture
import io.infinitic.common.workflows.engine.messages.RetryTasks as RetryTaskInWorkflow
import io.infinitic.common.workflows.tags.messages.RetryTasksByTag as RetryTaskInWorkflowByTag

class ClientDispatcher(
internal class ClientDispatcher(
logName: String,
private val consumerAsync: InfiniticConsumerAsync,
private val producer: InfiniticProducer
Expand Down

0 comments on commit a8648dc

Please sign in to comment.