scalafix FinalObject

This commit is contained in:
Bùi Việt Thành 2020-04-03 00:21:25 +07:00
parent 46a310e2cc
commit 4df76d6bce
40 changed files with 64 additions and 63 deletions

View file

@ -2,6 +2,7 @@
rules = [ rules = [
RemoveUnused RemoveUnused
"github:ohze/scalafix-rules/ConstructorProcedureSyntax" "github:ohze/scalafix-rules/ConstructorProcedureSyntax"
"github:ohze/scalafix-rules/FinalObject"
] ]
RemoveUnused.imports = true RemoveUnused.imports = true
RemoveUnused.privates = false RemoveUnused.privates = false

View file

@ -191,7 +191,7 @@ object Effect {
def duration(): java.time.Duration = d.asJava def duration(): java.time.Duration = d.asJava
} }
final case object ReceiveTimeoutCancelled extends ReceiveTimeoutCancelled case object ReceiveTimeoutCancelled extends ReceiveTimeoutCancelled
sealed abstract class ReceiveTimeoutCancelled extends Effect sealed abstract class ReceiveTimeoutCancelled extends Effect

View file

@ -30,7 +30,7 @@ private[akka] object ActorTestKitGuardian {
final case class StopActor[T](ref: ActorRef[T], replyTo: ActorRef[Ack.type]) extends TestKitCommand final case class StopActor[T](ref: ActorRef[T], replyTo: ActorRef[Ack.type]) extends TestKitCommand
final case class ActorStopped[T](replyTo: ActorRef[Ack.type]) extends TestKitCommand final case class ActorStopped[T](replyTo: ActorRef[Ack.type]) extends TestKitCommand
final case object Ack case object Ack
val testKitGuardian: Behavior[TestKitCommand] = Behaviors.receive[TestKitCommand] { val testKitGuardian: Behavior[TestKitCommand] = Behaviors.receive[TestKitCommand] {
case (context, SpawnActor(name, behavior, reply, props)) => case (context, SpawnActor(name, behavior, reply, props)) =>

View file

@ -17,7 +17,7 @@ object TestProducer {
trait Command trait Command
final case class RequestNext(sendTo: ActorRef[TestConsumer.Job]) extends Command final case class RequestNext(sendTo: ActorRef[TestConsumer.Job]) extends Command
private final case object Tick extends Command private case object Tick extends Command
val defaultProducerDelay: FiniteDuration = 20.millis val defaultProducerDelay: FiniteDuration = 20.millis

View file

@ -14,7 +14,7 @@ object TestProducerWorkPulling {
trait Command trait Command
final case class RequestNext(sendTo: ActorRef[TestConsumer.Job]) extends Command final case class RequestNext(sendTo: ActorRef[TestConsumer.Job]) extends Command
private final case object Tick extends Command private case object Tick extends Command
def apply( def apply(
delay: FiniteDuration, delay: FiniteDuration,

View file

@ -73,7 +73,7 @@ import akka.annotation.InternalApi
/** For commands defined in public ConsumerController */ /** For commands defined in public ConsumerController */
trait UnsealedInternalCommand extends InternalCommand trait UnsealedInternalCommand extends InternalCommand
private final case object Retry extends InternalCommand private case object Retry extends InternalCommand
private final case class ConsumerTerminated(consumer: ActorRef[_]) extends InternalCommand private final case class ConsumerTerminated(consumer: ActorRef[_]) extends InternalCommand

View file

@ -30,7 +30,7 @@ object DnsProtocol {
sealed trait RequestType sealed trait RequestType
final case class Ip(ipv4: Boolean = true, ipv6: Boolean = true) extends RequestType final case class Ip(ipv4: Boolean = true, ipv6: Boolean = true) extends RequestType
final case object Srv extends RequestType case object Srv extends RequestType
/** /**
* Java API * Java API

View file

@ -635,5 +635,5 @@ private final case class BackoffOptionsImpl(
} }
private sealed trait BackoffType private sealed trait BackoffType
private final case object StopImpliesFailure extends BackoffType private case object StopImpliesFailure extends BackoffType
private final case object RestartImpliesFailure extends BackoffType private case object RestartImpliesFailure extends BackoffType

View file

@ -424,5 +424,5 @@ private final case class BackoffOnFailureOptionsImpl[T](
} }
private[akka] sealed trait BackoffReset private[akka] sealed trait BackoffReset
private[akka] final case object ManualReset extends BackoffReset private[akka] case object ManualReset extends BackoffReset
private[akka] final case class AutoReset(resetBackoff: FiniteDuration) extends BackoffReset private[akka] final case class AutoReset(resetBackoff: FiniteDuration) extends BackoffReset

View file

@ -246,7 +246,7 @@ object BackoffSupervisor {
* Send this message to the `BackoffSupervisor` and it will reply with * Send this message to the `BackoffSupervisor` and it will reply with
* [[BackoffSupervisor.CurrentChild]] containing the `ActorRef` of the current child, if any. * [[BackoffSupervisor.CurrentChild]] containing the `ActorRef` of the current child, if any.
*/ */
final case object GetCurrentChild case object GetCurrentChild
/** /**
* Java API: Send this message to the `BackoffSupervisor` and it will reply with * Java API: Send this message to the `BackoffSupervisor` and it will reply with
@ -270,7 +270,7 @@ object BackoffSupervisor {
* Send this message to the `BackoffSupervisor` and it will reset the back-off. * Send this message to the `BackoffSupervisor` and it will reset the back-off.
* This should be used in conjunction with `withManualReset` in [[BackoffOptions]]. * This should be used in conjunction with `withManualReset` in [[BackoffOptions]].
*/ */
final case object Reset case object Reset
/** /**
* Java API: Send this message to the `BackoffSupervisor` and it will reset the back-off. * Java API: Send this message to the `BackoffSupervisor` and it will reset the back-off.
@ -282,7 +282,7 @@ object BackoffSupervisor {
* Send this message to the `BackoffSupervisor` and it will reply with * Send this message to the `BackoffSupervisor` and it will reply with
* [[BackoffSupervisor.RestartCount]] containing the current restart count. * [[BackoffSupervisor.RestartCount]] containing the current restart count.
*/ */
final case object GetRestartCount case object GetRestartCount
/** /**
* Java API: Send this message to the `BackoffSupervisor` and it will reply with * Java API: Send this message to the `BackoffSupervisor` and it will reply with

View file

@ -16,7 +16,7 @@ object TypedBenchmarkActors {
// to avoid benchmark to be dominated by allocations of message // to avoid benchmark to be dominated by allocations of message
// we pass the respondTo actor ref into the behavior // we pass the respondTo actor ref into the behavior
final case object Message case object Message
private def echoBehavior(respondTo: ActorRef[Message.type]): Behavior[Message.type] = Behaviors.receive { (_, _) => private def echoBehavior(respondTo: ActorRef[Message.type]): Behavior[Message.type] = Behaviors.receive { (_, _) =>
respondTo ! Message respondTo ! Message

View file

@ -104,8 +104,8 @@ object ClusterShardingSettings {
else else
throw new IllegalArgumentException("Not recognized StateStoreMode, only 'ddata' is supported.") throw new IllegalArgumentException("Not recognized StateStoreMode, only 'ddata' is supported.")
} }
final case object StateStoreModePersistence extends StateStoreMode { override def name = "persistence" } case object StateStoreModePersistence extends StateStoreMode { override def name = "persistence" }
final case object StateStoreModeDData extends StateStoreMode { override def name = "ddata" } case object StateStoreModeDData extends StateStoreMode { override def name = "ddata" }
// generated using kaze-class // generated using kaze-class
final class TuningParameters private ( final class TuningParameters private (

View file

@ -42,7 +42,7 @@ object ReliableDeliveryShardingSpec {
trait Command trait Command
final case class RequestNext(sendToRef: ActorRef[ShardingEnvelope[TestConsumer.Job]]) extends Command final case class RequestNext(sendToRef: ActorRef[ShardingEnvelope[TestConsumer.Job]]) extends Command
private final case object Tick extends Command private case object Tick extends Command
def apply(producerController: ActorRef[ShardingProducerController.Start[TestConsumer.Job]]): Behavior[Command] = { def apply(producerController: ActorRef[ShardingProducerController.Start[TestConsumer.Job]]): Behavior[Command] = {
Behaviors.setup { context => Behaviors.setup { context =>

View file

@ -96,7 +96,7 @@ private[akka] object Shard {
final case class LeaseAcquireResult(acquired: Boolean, reason: Option[Throwable]) extends DeadLetterSuppression final case class LeaseAcquireResult(acquired: Boolean, reason: Option[Throwable]) extends DeadLetterSuppression
final case class LeaseLost(reason: Option[Throwable]) extends DeadLetterSuppression final case class LeaseLost(reason: Option[Throwable]) extends DeadLetterSuppression
final case object LeaseRetry extends DeadLetterSuppression case object LeaseRetry extends DeadLetterSuppression
private val LeaseRetryTimer = "lease-retry" private val LeaseRetryTimer = "lease-retry"
object State { object State {

View file

@ -203,7 +203,7 @@ object ShardRegion {
* the `ShardRegion` and then the `ShardRegion` actor will be stopped. You can `watch` * the `ShardRegion` and then the `ShardRegion` actor will be stopped. You can `watch`
* it to know when it is completed. * it to know when it is completed.
*/ */
@SerialVersionUID(1L) final case object GracefulShutdown extends ShardRegionCommand @SerialVersionUID(1L) case object GracefulShutdown extends ShardRegionCommand
/** /**
* We must be sure that a shard is initialized before to start send messages to it. * We must be sure that a shard is initialized before to start send messages to it.
@ -226,7 +226,7 @@ object ShardRegion {
* Intended for testing purpose to see when cluster sharding is "ready" or to monitor * Intended for testing purpose to see when cluster sharding is "ready" or to monitor
* the state of the shard regions. * the state of the shard regions.
*/ */
@SerialVersionUID(1L) final case object GetCurrentRegions extends ShardRegionQuery with ClusterShardingSerializable @SerialVersionUID(1L) case object GetCurrentRegions extends ShardRegionQuery with ClusterShardingSerializable
/** /**
* Java API: * Java API:

View file

@ -36,7 +36,7 @@ object ExternalShardAllocationStrategy {
// local only messages // local only messages
private[akka] final case class GetShardLocation(shard: ShardId) private[akka] final case class GetShardLocation(shard: ShardId)
private[akka] final case object GetShardLocations private[akka] case object GetShardLocations
private[akka] final case class GetShardLocationsResponse(desiredAllocations: Map[ShardId, Address]) private[akka] final case class GetShardLocationsResponse(desiredAllocations: Map[ShardId, Address])
private[akka] final case class GetShardLocationResponse(address: Option[Address]) private[akka] final case class GetShardLocationResponse(address: Option[Address])

View file

@ -217,7 +217,7 @@ object ClusterSingletonManager {
final case class HandOverRetry(count: Int) final case class HandOverRetry(count: Int)
final case class TakeOverRetry(count: Int) final case class TakeOverRetry(count: Int)
final case object LeaseRetry case object LeaseRetry
case object Cleanup case object Cleanup
case object StartOldestChangedBuffer case object StartOldestChangedBuffer

View file

@ -35,7 +35,7 @@ object TestLeaseActor {
final case class Release(owner: String) extends LeaseRequest final case class Release(owner: String) extends LeaseRequest
final case class Create(leaseName: String, ownerName: String) extends JavaSerializable final case class Create(leaseName: String, ownerName: String) extends JavaSerializable
final case object GetRequests extends JavaSerializable case object GetRequests extends JavaSerializable
final case class LeaseRequests(requests: List[LeaseRequest]) extends JavaSerializable final case class LeaseRequests(requests: List[LeaseRequest]) extends JavaSerializable
final case class ActionRequest(request: LeaseRequest, result: Any) extends JavaSerializable // boolean of Failure final case class ActionRequest(request: LeaseRequest, result: Any) extends JavaSerializable // boolean of Failure
} }

View file

@ -177,7 +177,7 @@ private[cluster] object InternalClusterAction {
final case class PublishChanges(state: MembershipState) extends PublishMessage final case class PublishChanges(state: MembershipState) extends PublishMessage
final case class PublishEvent(event: ClusterDomainEvent) extends PublishMessage final case class PublishEvent(event: ClusterDomainEvent) extends PublishMessage
final case object ExitingCompleted case object ExitingCompleted
} }

View file

@ -337,7 +337,7 @@ object ClusterEvent {
* This event is published when the cluster node is shutting down, * This event is published when the cluster node is shutting down,
* before the final [[MemberRemoved]] events are published. * before the final [[MemberRemoved]] events are published.
*/ */
final case object ClusterShuttingDown extends ClusterDomainEvent case object ClusterShuttingDown extends ClusterDomainEvent
/** /**
* Java API: get the singleton instance of `ClusterShuttingDown` event * Java API: get the singleton instance of `ClusterShuttingDown` event

View file

@ -781,7 +781,7 @@ object Replicator {
* Get current number of replicas, including the local replica. * Get current number of replicas, including the local replica.
* Will reply to sender with [[ReplicaCount]]. * Will reply to sender with [[ReplicaCount]].
*/ */
final case object GetReplicaCount case object GetReplicaCount
/** /**
* Java API: The `GetReplicaCount` instance * Java API: The `GetReplicaCount` instance

View file

@ -52,7 +52,7 @@ final case class TimeBasedUUID(value: UUID) extends Offset with Ordered[TimeBase
/** /**
* Used when retrieving all events. * Used when retrieving all events.
*/ */
final case object NoOffset extends Offset { case object NoOffset extends Offset {
/** /**
* Java API: * Java API:

View file

@ -32,7 +32,7 @@ object ClusterSingletonPersistenceSpec {
sealed trait Command sealed trait Command
final case class Add(s: String) extends Command final case class Add(s: String) extends Command
final case class Get(replyTo: ActorRef[String]) extends Command final case class Get(replyTo: ActorRef[String]) extends Command
private final case object StopPlz extends Command private case object StopPlz extends Command
val persistentActor: Behavior[Command] = val persistentActor: Behavior[Command] =
EventSourcedBehavior[Command, String, String]( EventSourcedBehavior[Command, String, String](

View file

@ -44,10 +44,10 @@ object EventSourcedBehaviorRetentionSpec extends Matchers {
""") """)
sealed trait Command extends CborSerializable sealed trait Command extends CborSerializable
final case object Increment extends Command case object Increment extends Command
final case class IncrementWithPersistAll(nr: Int) extends Command final case class IncrementWithPersistAll(nr: Int) extends Command
final case class GetValue(replyTo: ActorRef[State]) extends Command final case class GetValue(replyTo: ActorRef[State]) extends Command
final case object StopIt extends Command case object StopIt extends Command
final case class WrappedSignal(signal: EventSourcedSignal) final case class WrappedSignal(signal: EventSourcedSignal)

View file

@ -91,22 +91,22 @@ object EventSourcedBehaviorSpec {
""") """)
sealed trait Command extends CborSerializable sealed trait Command extends CborSerializable
final case object Increment extends Command case object Increment extends Command
final case object IncrementThenLogThenStop extends Command case object IncrementThenLogThenStop extends Command
final case object IncrementTwiceThenLogThenStop extends Command case object IncrementTwiceThenLogThenStop extends Command
final case class IncrementWithPersistAll(nr: Int) extends Command final case class IncrementWithPersistAll(nr: Int) extends Command
final case object IncrementLater extends Command case object IncrementLater extends Command
final case object IncrementAfterReceiveTimeout extends Command case object IncrementAfterReceiveTimeout extends Command
final case object IncrementTwiceAndThenLog extends Command case object IncrementTwiceAndThenLog extends Command
final case class IncrementWithConfirmation(replyTo: ActorRef[Done]) extends Command final case class IncrementWithConfirmation(replyTo: ActorRef[Done]) extends Command
final case object DoNothingAndThenLog extends Command case object DoNothingAndThenLog extends Command
final case object EmptyEventsListAndThenLog extends Command case object EmptyEventsListAndThenLog extends Command
final case class GetValue(replyTo: ActorRef[State]) extends Command final case class GetValue(replyTo: ActorRef[State]) extends Command
final case object DelayFinished extends Command case object DelayFinished extends Command
private case object Timeout extends Command private case object Timeout extends Command
final case object LogThenStop extends Command case object LogThenStop extends Command
final case object Fail extends Command case object Fail extends Command
final case object StopIt extends Command case object StopIt extends Command
sealed trait Event extends CborSerializable sealed trait Event extends CborSerializable
final case class Incremented(delta: Int) extends Event final case class Incremented(delta: Int) extends Event

View file

@ -98,7 +98,7 @@ private[persistence] trait AsyncWriteProxy extends AsyncWriteJournal with Stash
*/ */
private[persistence] object AsyncWriteProxy { private[persistence] object AsyncWriteProxy {
final case class SetStore(ref: ActorRef) final case class SetStore(ref: ActorRef)
final case object InitTimeout case object InitTimeout
} }
/** /**

View file

@ -105,14 +105,14 @@ final case class SingleEventSeq(event: Any) extends EventSeq { // TODO try to ma
} }
sealed trait EmptyEventSeq extends EventSeq sealed trait EmptyEventSeq extends EventSeq
final object EmptyEventSeq extends EmptyEventSeq { object EmptyEventSeq extends EmptyEventSeq {
override def events = Nil override def events = Nil
} }
final case class EventsSeq[E](events: immutable.Seq[E]) extends EventSeq final case class EventsSeq[E](events: immutable.Seq[E]) extends EventSeq
/** No-op model adapter which passes through the incoming events as-is. */ /** No-op model adapter which passes through the incoming events as-is. */
final case object IdentityEventAdapter extends EventAdapter { case object IdentityEventAdapter extends EventAdapter {
override def toJournal(event: Any): Any = event override def toJournal(event: Any): Any = event
override def fromJournal(event: Any, manifest: String): EventSeq = EventSeq.single(event) override def fromJournal(event: Any, manifest: String): EventSeq = EventSeq.single(event)
override def manifest(event: Any): String = "" override def manifest(event: Any): String = ""

View file

@ -92,7 +92,7 @@ private[persistence] object LeveldbJournal {
* subscriber followed by [[PersistenceIdAdded]] messages when new persistenceIds * subscriber followed by [[PersistenceIdAdded]] messages when new persistenceIds
* are created. * are created.
*/ */
final case object SubscribeAllPersistenceIds extends SubscriptionCommand case object SubscribeAllPersistenceIds extends SubscriptionCommand
final case class CurrentPersistenceIds(allPersistenceIds: Set[String]) extends DeadLetterSuppression final case class CurrentPersistenceIds(allPersistenceIds: Set[String]) extends DeadLetterSuppression
final case class PersistenceIdAdded(persistenceId: String) extends DeadLetterSuppression final case class PersistenceIdAdded(persistenceId: String) extends DeadLetterSuppression

View file

@ -14,7 +14,7 @@ object OptimizedRecoverySpec {
case object TakeSnapshot case object TakeSnapshot
final case class Save(s: String) final case class Save(s: String)
final case class Saved(s: String, seqNr: Long) final case class Saved(s: String, seqNr: Long)
final case object PersistFromRecoveryCompleted case object PersistFromRecoveryCompleted
def props(name: String, recovery: Recovery, probe: ActorRef): Props = { def props(name: String, recovery: Recovery, probe: ActorRef): Props = {
Props(new TestPersistentActor(name, recovery, probe)) Props(new TestPersistentActor(name, recovery, probe))

View file

@ -63,7 +63,7 @@ object LatencySpec extends MultiNodeConfig {
} }
""")).withFallback(RemotingMultiNodeSpec.commonConfig)) """)).withFallback(RemotingMultiNodeSpec.commonConfig))
final case object Reset extends CborSerializable case object Reset extends CborSerializable
def echoProps(): Props = def echoProps(): Props =
Props(new Echo).withDispatcher(Dispatchers.InternalDispatcherId) Props(new Echo).withDispatcher(Dispatchers.InternalDispatcherId)

View file

@ -86,9 +86,9 @@ object MaxThroughputSpec extends MultiNodeConfig {
case object Run case object Run
sealed trait Echo extends DeadLetterSuppression with CborSerializable sealed trait Echo extends DeadLetterSuppression with CborSerializable
final case object StartAck extends Echo case object StartAck extends Echo
final case class Start(correspondingReceiver: ActorRef) extends Echo final case class Start(correspondingReceiver: ActorRef) extends Echo
final case object End extends Echo case object End extends Echo
final case class Warmup(payload: AnyRef) extends CborSerializable final case class Warmup(payload: AnyRef) extends CborSerializable
final case class EndResult(totalReceived: Long) extends CborSerializable final case class EndResult(totalReceived: Long) extends CborSerializable
final case class FlowControl(id: Int, burstStartTime: Long) extends Echo final case class FlowControl(id: Int, burstStartTime: Long) extends Echo

View file

@ -35,7 +35,7 @@ object TestPublisher {
final case class CancelSubscription(subscription: Subscription, cause: Throwable) extends PublisherEvent final case class CancelSubscription(subscription: Subscription, cause: Throwable) extends PublisherEvent
final case class RequestMore(subscription: Subscription, elements: Long) extends PublisherEvent final case class RequestMore(subscription: Subscription, elements: Long) extends PublisherEvent
final object SubscriptionDone extends NoSerializationVerificationNeeded object SubscriptionDone extends NoSerializationVerificationNeeded
/** /**
* Publisher that signals complete to subscribers, after handing a void subscription. * Publisher that signals complete to subscribers, after handing a void subscription.

View file

@ -310,7 +310,7 @@ object Attributes {
final case class LogLevels(onElement: Logging.LogLevel, onFinish: Logging.LogLevel, onFailure: Logging.LogLevel) final case class LogLevels(onElement: Logging.LogLevel, onFinish: Logging.LogLevel, onFailure: Logging.LogLevel)
extends Attribute extends Attribute
final case object AsyncBoundary extends Attribute case object AsyncBoundary extends Attribute
/** /**
* Cancellation strategies provide a way to configure the behavior of a stage when `cancelStage` is called. * Cancellation strategies provide a way to configure the behavior of a stage when `cancelStage` is called.

View file

@ -14,7 +14,7 @@ object QueueOfferResult {
/** /**
* Type is used to indicate that stream is successfully enqueued an element * Type is used to indicate that stream is successfully enqueued an element
*/ */
final case object Enqueued extends QueueOfferResult case object Enqueued extends QueueOfferResult
/** /**
* Java API: The `Enqueued` singleton instance * Java API: The `Enqueued` singleton instance
@ -24,7 +24,7 @@ object QueueOfferResult {
/** /**
* Type is used to indicate that stream is dropped an element * Type is used to indicate that stream is dropped an element
*/ */
final case object Dropped extends QueueOfferResult case object Dropped extends QueueOfferResult
/** /**
* Java API: The `Dropped` singleton instance * Java API: The `Dropped` singleton instance

View file

@ -16,12 +16,12 @@ private[akka] object SubstreamCancelStrategies {
/** /**
* INTERNAL API * INTERNAL API
*/ */
private[akka] final case object Propagate extends SubstreamCancelStrategy private[akka] case object Propagate extends SubstreamCancelStrategy
/** /**
* INTERNAL API * INTERNAL API
*/ */
private[akka] final case object Drain extends SubstreamCancelStrategy private[akka] case object Drain extends SubstreamCancelStrategy
} }
object SubstreamCancelStrategy { object SubstreamCancelStrategy {

View file

@ -12,7 +12,7 @@ import akka.stream.stage._
/** /**
* INTERNAL API * INTERNAL API
*/ */
@InternalApi private[akka] final object EmptySource extends GraphStage[SourceShape[Nothing]] { @InternalApi private[akka] object EmptySource extends GraphStage[SourceShape[Nothing]] {
val out = Outlet[Nothing]("EmptySource.out") val out = Outlet[Nothing]("EmptySource.out")
override val shape = SourceShape(out) override val shape = SourceShape(out)

View file

@ -22,7 +22,7 @@ import scala.concurrent.Promise
@InternalApi @InternalApi
private[akka] object MaterializerGuardian { private[akka] object MaterializerGuardian {
final case object StartMaterializer case object StartMaterializer
final case class MaterializerStarted(materializer: Materializer) final case class MaterializerStarted(materializer: Materializer)
// this is available to keep backwards compatibility with ActorMaterializer and should // this is available to keep backwards compatibility with ActorMaterializer and should

View file

@ -180,7 +180,7 @@ import akka.util.unused
/** /**
* INTERNAL API * INTERNAL API
*/ */
@InternalApi private[akka] final case object PopAttributes extends Traversal @InternalApi private[akka] case object PopAttributes extends Traversal
/** /**
* INTERNAL API * INTERNAL API
@ -190,7 +190,7 @@ import akka.util.unused
/** /**
* INTERNAL API * INTERNAL API
*/ */
@InternalApi private[akka] final case object ExitIsland extends Traversal @InternalApi private[akka] case object ExitIsland extends Traversal
/** /**
* INTERNAL API * INTERNAL API

View file

@ -72,6 +72,6 @@ private[akka] object StreamRefsProtocol {
* Ack that failure or completion has been seen and the remote side can stop * Ack that failure or completion has been seen and the remote side can stop
*/ */
@InternalApi @InternalApi
private[akka] final case object Ack extends StreamRefsProtocol with DeadLetterSuppression private[akka] case object Ack extends StreamRefsProtocol with DeadLetterSuppression
} }

View file

@ -30,9 +30,9 @@ object SocketUtil {
} }
sealed trait Protocol sealed trait Protocol
final case object Tcp extends Protocol case object Tcp extends Protocol
final case object Udp extends Protocol case object Udp extends Protocol
final case object Both extends Protocol case object Both extends Protocol
/** @return A port on 'localhost' that is currently available */ /** @return A port on 'localhost' that is currently available */
def temporaryLocalPort(udp: Boolean = false): Int = temporaryServerAddress("localhost", udp).getPort def temporaryLocalPort(udp: Boolean = false): Int = temporaryServerAddress("localhost", udp).getPort