Remove ApiMayChange from coordination module (#27026)
Note that it will be fully stable in 2.6.0 so no guarantees for milestones before that. * remove api may change from sharding lease settings * mima * Remove settings from module
This commit is contained in:
parent
37f42d3220
commit
3888de23ed
12 changed files with 4 additions and 33 deletions
|
|
@ -8,7 +8,7 @@ import scala.concurrent.duration._
|
|||
import scala.concurrent.duration.FiniteDuration
|
||||
import akka.actor.ActorSystem
|
||||
import akka.actor.NoSerializationVerificationNeeded
|
||||
import akka.annotation.{ ApiMayChange, InternalApi }
|
||||
import akka.annotation.InternalApi
|
||||
import com.typesafe.config.Config
|
||||
import akka.cluster.Cluster
|
||||
import akka.cluster.singleton.ClusterSingletonManagerSettings
|
||||
|
|
@ -302,7 +302,6 @@ final class ClusterShardingSettings(
|
|||
def withPassivateIdleAfter(duration: java.time.Duration): ClusterShardingSettings =
|
||||
copy(passivateIdleAfter = duration.asScala)
|
||||
|
||||
@ApiMayChange
|
||||
def withLeaseSettings(leaseSettings: LeaseUsageSettings): ClusterShardingSettings =
|
||||
copy(leaseSettings = Some(leaseSettings))
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
# Made final when removing api may change
|
||||
ProblemFilters.exclude[FinalClassProblem]("akka.coordination.lease.LeaseUsageSettings")
|
||||
|
|
@ -4,10 +4,6 @@
|
|||
|
||||
package akka.coordination.lease
|
||||
|
||||
import akka.annotation.ApiMayChange
|
||||
|
||||
@ApiMayChange
|
||||
class LeaseException(message: String) extends RuntimeException(message)
|
||||
|
||||
@ApiMayChange
|
||||
final class LeaseTimeoutException(message: String) extends LeaseException(message)
|
||||
|
|
|
|||
|
|
@ -4,17 +4,14 @@
|
|||
|
||||
package akka.coordination.lease
|
||||
|
||||
import akka.annotation.ApiMayChange
|
||||
import com.typesafe.config.Config
|
||||
|
||||
object LeaseSettings {
|
||||
@ApiMayChange
|
||||
def apply(config: Config, leaseName: String, ownerName: String): LeaseSettings = {
|
||||
new LeaseSettings(leaseName, ownerName, TimeoutSettings(config), config)
|
||||
}
|
||||
}
|
||||
|
||||
@ApiMayChange
|
||||
final class LeaseSettings(
|
||||
val leaseName: String,
|
||||
val ownerName: String,
|
||||
|
|
|
|||
|
|
@ -4,14 +4,12 @@
|
|||
|
||||
package akka.coordination.lease
|
||||
|
||||
import akka.annotation.ApiMayChange
|
||||
import akka.util.JavaDurationConverters._
|
||||
import akka.util.PrettyDuration._
|
||||
|
||||
import scala.concurrent.duration.FiniteDuration
|
||||
|
||||
@ApiMayChange
|
||||
class LeaseUsageSettings private[akka] (val leaseImplementation: String, val leaseRetryInterval: FiniteDuration) {
|
||||
final class LeaseUsageSettings private[akka] (val leaseImplementation: String, val leaseRetryInterval: FiniteDuration) {
|
||||
def getLeaseRetryInterval(): java.time.Duration = leaseRetryInterval.asJava
|
||||
|
||||
override def toString = s"LeaseUsageSettings($leaseImplementation, ${leaseRetryInterval.pretty})"
|
||||
|
|
|
|||
|
|
@ -4,13 +4,11 @@
|
|||
|
||||
package akka.coordination.lease
|
||||
|
||||
import akka.annotation.ApiMayChange
|
||||
import com.typesafe.config.{ Config, ConfigValueType }
|
||||
import akka.util.JavaDurationConverters._
|
||||
import scala.concurrent.duration._
|
||||
|
||||
object TimeoutSettings {
|
||||
@ApiMayChange
|
||||
def apply(config: Config): TimeoutSettings = {
|
||||
val heartBeatTimeout = config.getDuration("heartbeat-timeout").asScala
|
||||
val heartBeatInterval = config.getValue("heartbeat-interval").valueType() match {
|
||||
|
|
@ -24,7 +22,6 @@ object TimeoutSettings {
|
|||
|
||||
}
|
||||
|
||||
@ApiMayChange
|
||||
final class TimeoutSettings(
|
||||
val heartbeatInterval: FiniteDuration,
|
||||
val heartbeatTimeout: FiniteDuration,
|
||||
|
|
|
|||
|
|
@ -7,10 +7,8 @@ package akka.coordination.lease.javadsl
|
|||
import java.util.Optional
|
||||
import java.util.concurrent.CompletionStage
|
||||
|
||||
import akka.annotation.ApiMayChange
|
||||
import akka.coordination.lease.LeaseSettings
|
||||
|
||||
@ApiMayChange
|
||||
abstract class Lease() {
|
||||
|
||||
def getSettings(): LeaseSettings
|
||||
|
|
|
|||
|
|
@ -5,11 +5,9 @@
|
|||
package akka.coordination.lease.javadsl
|
||||
|
||||
import akka.actor.{ ActorSystem, ExtendedActorSystem, Extension, ExtensionId, ExtensionIdProvider }
|
||||
import akka.annotation.ApiMayChange
|
||||
import akka.coordination.lease.internal.LeaseAdapter
|
||||
import akka.coordination.lease.scaladsl.{ LeaseProvider => ScalaLeaseProvider }
|
||||
|
||||
@ApiMayChange
|
||||
object LeaseProvider extends ExtensionId[LeaseProvider] with ExtensionIdProvider {
|
||||
override def get(system: ActorSystem): LeaseProvider = super.get(system)
|
||||
|
||||
|
|
@ -20,7 +18,6 @@ object LeaseProvider extends ExtensionId[LeaseProvider] with ExtensionIdProvider
|
|||
private final case class LeaseKey(leaseName: String, configPath: String, clientName: String)
|
||||
}
|
||||
|
||||
@ApiMayChange
|
||||
class LeaseProvider(system: ExtendedActorSystem) extends Extension {
|
||||
private val delegate = ScalaLeaseProvider(system)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,12 +4,10 @@
|
|||
|
||||
package akka.coordination.lease.scaladsl
|
||||
|
||||
import akka.annotation.ApiMayChange
|
||||
import akka.coordination.lease.LeaseSettings
|
||||
|
||||
import scala.concurrent.Future
|
||||
|
||||
@ApiMayChange
|
||||
abstract class Lease(val settings: LeaseSettings) {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -14,11 +14,9 @@ import akka.actor.ExtendedActorSystem
|
|||
import akka.actor.Extension
|
||||
import akka.actor.ExtensionId
|
||||
import akka.actor.ExtensionIdProvider
|
||||
import akka.annotation.ApiMayChange
|
||||
import akka.event.Logging
|
||||
import akka.coordination.lease.LeaseSettings
|
||||
|
||||
@ApiMayChange
|
||||
object LeaseProvider extends ExtensionId[LeaseProvider] with ExtensionIdProvider {
|
||||
override def get(system: ActorSystem): LeaseProvider = super.get(system)
|
||||
|
||||
|
|
@ -29,7 +27,6 @@ object LeaseProvider extends ExtensionId[LeaseProvider] with ExtensionIdProvider
|
|||
private final case class LeaseKey(leaseName: String, configPath: String, clientName: String)
|
||||
}
|
||||
|
||||
@ApiMayChange
|
||||
class LeaseProvider(system: ExtendedActorSystem) extends Extension {
|
||||
import LeaseProvider.LeaseKey
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
# Coordination
|
||||
|
||||
@@@ warning
|
||||
|
||||
This module is currently marked as @ref:[may change](common/may-change.md). It is ready to be used
|
||||
in production but the API may change without warning or a deprecation period.
|
||||
|
||||
@@@
|
||||
|
||||
Akka Coordination is a set of tools for distributed coordination.
|
||||
|
||||
## Dependency
|
||||
|
|
|
|||
|
|
@ -455,7 +455,6 @@ lazy val coordination = akkaModule("akka-coordination")
|
|||
.settings(Dependencies.coordination)
|
||||
.settings(AutomaticModuleName.settings("akka.coordination"))
|
||||
.settings(OSGi.coordination)
|
||||
.settings(AkkaBuild.mayChangeSettings)
|
||||
|
||||
def akkaModule(name: String): Project =
|
||||
Project(id = name, base = file(name))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue