+build Add sort imports support. (#28780)

* Add scalafix plugin for jdk 9.
* Add command alias sortImports.
* Excludes some sources from SortImports.
* Update SortImports to 0.4.0
* Sort imports with `sortImports` command.
This commit is contained in:
kerr 2020-04-27 20:32:18 +08:00 committed by GitHub
parent ea7205eaf7
commit 0e4d41ad33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1534 changed files with 7454 additions and 6165 deletions

View file

@ -8,11 +8,17 @@ import java.io.File
import java.nio.ByteBuffer
import java.util.concurrent.TimeUnit
import akka.util.ccompat.JavaConverters._
import scala.concurrent.duration._
import scala.util.Try
import scala.util.control.NonFatal
import com.typesafe.config.Config
import org.lmdbjava.Dbi
import org.lmdbjava.DbiFlags
import org.lmdbjava.Env
import org.lmdbjava.EnvFlags
import org.lmdbjava.Txn
import akka.actor.Actor
import akka.actor.ActorLogging
import akka.actor.ActorRef
@ -27,12 +33,7 @@ import akka.serialization.SerializationExtension
import akka.serialization.SerializerWithStringManifest
import akka.util.ByteString
import akka.util.OptionVal
import com.typesafe.config.Config
import org.lmdbjava.DbiFlags
import org.lmdbjava.Env
import org.lmdbjava.EnvFlags
import org.lmdbjava.Txn
import org.lmdbjava.Dbi
import akka.util.ccompat.JavaConverters._
/**
* An actor implementing the durable store for the Distributed Data `Replicator`
@ -112,8 +113,8 @@ object LmdbDurableStore {
final class LmdbDurableStore(config: Config) extends Actor with ActorLogging {
import DurableStore._
import LmdbDurableStore.WriteBehind
import LmdbDurableStore.Lmdb
import LmdbDurableStore.WriteBehind
val serialization = SerializationExtension(context.system)
val serializer = serialization.serializerFor(classOf[DurableDataEnvelope]).asInstanceOf[SerializerWithStringManifest]

View file

@ -4,10 +4,11 @@
package akka.cluster.ddata
import java.math.BigInteger
import akka.annotation.InternalApi
import akka.cluster.Cluster
import akka.cluster.UniqueAddress
import java.math.BigInteger
import akka.annotation.InternalApi
object GCounter {
val empty: GCounter = new GCounter

View file

@ -4,13 +4,13 @@
package akka.cluster.ddata
import scala.collection.immutable
import akka.annotation.InternalApi
import akka.cluster.Cluster
import akka.cluster.UniqueAddress
import akka.util.HashCode
import akka.annotation.InternalApi
import akka.cluster.ddata.ORMap.ZeroTag
import scala.collection.immutable
import akka.util.HashCode
object ORMap {
private val _empty: ORMap[Any, ReplicatedData] = new ORMap(ORSet.empty, Map.empty, VanillaORMapTag)

View file

@ -5,8 +5,8 @@
package akka.cluster.ddata
import akka.annotation.InternalApi
import akka.cluster.ddata.ORMap._
import akka.cluster.{ Cluster, UniqueAddress }
import akka.cluster.ddata.ORMap._
object ORMultiMap {

View file

@ -6,10 +6,11 @@ package akka.cluster.ddata
import scala.annotation.tailrec
import scala.collection.immutable
import akka.annotation.InternalApi
import akka.cluster.Cluster
import akka.cluster.UniqueAddress
import akka.util.{ unused, HashCode }
import akka.annotation.InternalApi
object ORSet {
private val _empty: ORSet[Any] = new ORSet(Map.empty, VersionVector.empty)

View file

@ -4,12 +4,12 @@
package akka.cluster.ddata
import akka.cluster.Cluster
import akka.cluster.UniqueAddress
import akka.util.HashCode
import java.math.BigInteger
import akka.annotation.InternalApi
import akka.cluster.Cluster
import akka.cluster.UniqueAddress
import akka.util.HashCode
object PNCounter {
val empty: PNCounter = new PNCounter(GCounter.empty, GCounter.empty)

View file

@ -5,9 +5,9 @@
package akka.cluster.ddata
import akka.actor.Address
import akka.annotation.InternalApi
import akka.cluster.Member
import akka.cluster.UniqueAddress
import akka.annotation.InternalApi
import akka.util.unused
/**

View file

@ -4,10 +4,12 @@
package akka.cluster.ddata
import akka.cluster.UniqueAddress
import scala.compat.java8.OptionConverters._
import java.util.Optional
import scala.compat.java8.OptionConverters._
import akka.cluster.UniqueAddress
/**
* Interface for implementing a state based convergent
* replicated data type (CvRDT).

View file

@ -5,66 +5,60 @@
package akka.cluster.ddata
import java.security.MessageDigest
import java.util.Optional
import java.util.concurrent.ThreadLocalRandom
import java.util.concurrent.TimeUnit
import java.util.function.{ Function => JFunction }
import scala.annotation.varargs
import scala.collection.immutable
import scala.collection.immutable.TreeSet
import scala.collection.mutable
import scala.concurrent.duration._
import scala.concurrent.duration.FiniteDuration
import java.util.concurrent.ThreadLocalRandom
import scala.util.Failure
import scala.util.Success
import scala.util.Try
import scala.util.control.NoStackTrace
import scala.util.control.NonFatal
import com.github.ghik.silencer.silent
import com.typesafe.config.Config
import akka.actor.Actor
import akka.actor.ActorInitializationException
import akka.actor.ActorLogging
import akka.actor.ActorRef
import akka.actor.ActorSelection
import akka.actor.ActorSystem
import akka.actor.Address
import akka.actor.NoSerializationVerificationNeeded
import akka.actor.Cancellable
import akka.actor.DeadLetterSuppression
import akka.actor.Deploy
import akka.actor.ExtendedActorSystem
import akka.actor.NoSerializationVerificationNeeded
import akka.actor.OneForOneStrategy
import akka.actor.Props
import akka.actor.ReceiveTimeout
import akka.actor.SupervisorStrategy
import akka.actor.Terminated
import akka.annotation.InternalApi
import akka.cluster.Cluster
import akka.cluster.ClusterEvent._
import akka.cluster.ClusterEvent.InitialStateAsEvents
import akka.cluster.Member
import akka.cluster.MemberStatus
import akka.cluster.UniqueAddress
import akka.cluster.ddata.DurableStore._
import akka.cluster.ddata.Key.KeyId
import akka.cluster.ddata.Key.KeyR
import akka.dispatch.Dispatchers
import akka.event.Logging
import akka.serialization.SerializationExtension
import akka.util.ByteString
import com.typesafe.config.Config
import java.util.function.{ Function => JFunction }
import akka.dispatch.Dispatchers
import akka.actor.DeadLetterSuppression
import akka.cluster.ddata.Key.KeyR
import java.util.Optional
import akka.cluster.ddata.DurableStore._
import akka.actor.ExtendedActorSystem
import akka.actor.SupervisorStrategy
import akka.actor.OneForOneStrategy
import akka.actor.ActorInitializationException
import java.util.concurrent.TimeUnit
import akka.util.Helpers.toRootLowerCase
import akka.actor.Cancellable
import scala.util.control.NonFatal
import akka.cluster.ddata.Key.KeyId
import akka.annotation.InternalApi
import scala.collection.immutable.TreeSet
import akka.cluster.MemberStatus
import scala.annotation.varargs
import akka.event.Logging
import akka.util.JavaDurationConverters._
import akka.util.ccompat._
import com.github.ghik.silencer.silent
@ccompatUsedUntil213
object ReplicatorSettings {
@ -1301,10 +1295,10 @@ object Replicator {
*/
final class Replicator(settings: ReplicatorSettings) extends Actor with ActorLogging {
import PruningState._
import Replicator._
import Replicator.Internal._
import Replicator.Internal.DeltaPropagation.NoDeltaPlaceholder
import PruningState._
import settings._
val cluster = Cluster(context.system)
@ -2460,9 +2454,9 @@ final class Replicator(settings: ReplicatorSettings) extends Actor with ActorLog
extends ReadWriteAggregator
with ActorLogging {
import ReadWriteAggregator._
import Replicator._
import Replicator.Internal._
import ReadWriteAggregator._
override def timeout: FiniteDuration = consistency.timeout
@ -2605,9 +2599,9 @@ final class Replicator(settings: ReplicatorSettings) extends Actor with ActorLog
extends ReadWriteAggregator
with ActorLogging {
import ReadWriteAggregator._
import Replicator._
import Replicator.Internal._
import ReadWriteAggregator._
override def timeout: FiniteDuration = consistency.timeout

View file

@ -5,11 +5,13 @@
package akka.cluster.ddata
import java.util.concurrent.atomic.AtomicLong
import scala.annotation.tailrec
import scala.collection.immutable.TreeMap
import akka.annotation.InternalApi
import akka.cluster.Cluster
import akka.cluster.UniqueAddress
import akka.annotation.InternalApi
/**
* VersionVector module with helper classes and methods.

View file

@ -5,32 +5,32 @@
package akka.cluster.ddata.protobuf
import java.{ util, lang => jl }
import java.io.NotSerializableException
import java.util
import java.util.ArrayList
import java.util.Collections
import java.util.Comparator
import scala.annotation.tailrec
import akka.util.ccompat.JavaConverters._
import scala.collection.immutable
import com.github.ghik.silencer.silent
import akka.actor.ActorRef
import akka.actor.ExtendedActorSystem
import akka.cluster.ddata._
import akka.cluster.ddata.Replicator.Internal._
import akka.cluster.ddata.protobuf.msg.{ ReplicatedDataMessages => rd }
import akka.cluster.ddata.protobuf.msg.{ ReplicatorMessages => dm }
import akka.serialization.SerializerWithStringManifest
import akka.serialization.BaseSerializer
import akka.protobufv3.internal.{ ByteString, GeneratedMessageV3 }
import akka.util.ByteString.UTF_8
import java.io.NotSerializableException
import java.util
import com.github.ghik.silencer.silent
import akka.actor.ActorRef
import akka.cluster.ddata.protobuf.msg.ReplicatorMessages.OtherMessage
import akka.protobufv3.internal.{ ByteString, GeneratedMessageV3 }
import akka.protobufv3.internal.GeneratedMessageV3
import akka.serialization.BaseSerializer
import akka.serialization.Serialization
import akka.serialization.SerializerWithStringManifest
import akka.util.ByteString.UTF_8
import akka.util.ccompat._
import akka.util.ccompat.JavaConverters._
@ccompatUsedUntil213
private object ReplicatedDataSerializer {

View file

@ -4,35 +4,37 @@
package akka.cluster.ddata.protobuf
import scala.concurrent.duration._
import java.io.NotSerializableException
import java.util.concurrent.TimeUnit
import akka.util.ccompat.JavaConverters._
import java.util.concurrent.atomic.AtomicInteger
import scala.annotation.tailrec
import scala.collection.immutable
import scala.concurrent.duration._
import scala.concurrent.duration.Duration
import scala.concurrent.duration.FiniteDuration
import akka.actor.Address
import akka.actor.ExtendedActorSystem
import akka.annotation.InternalApi
import akka.cluster.Member
import akka.cluster.UniqueAddress
import akka.cluster.ddata.DurableStore.DurableDataEnvelope
import akka.cluster.ddata.Key.KeyR
import akka.cluster.ddata.PruningState
import akka.cluster.ddata.PruningState.PruningPerformed
import akka.cluster.ddata.ReplicatedData
import akka.cluster.ddata.Replicator._
import akka.cluster.ddata.Replicator.Internal._
import akka.cluster.ddata.VersionVector
import akka.cluster.ddata.protobuf.msg.{ ReplicatorMessages => dm }
import akka.protobufv3.internal.ByteString
import akka.serialization.BaseSerializer
import akka.serialization.Serialization
import akka.serialization.SerializerWithStringManifest
import akka.serialization.BaseSerializer
import akka.util.{ ByteString => AkkaByteString }
import akka.protobufv3.internal.ByteString
import akka.cluster.ddata.Key.KeyR
import java.util.concurrent.atomic.AtomicInteger
import scala.annotation.tailrec
import scala.concurrent.duration.FiniteDuration
import akka.cluster.ddata.DurableStore.DurableDataEnvelope
import java.io.NotSerializableException
import akka.actor.Address
import akka.cluster.ddata.VersionVector
import akka.annotation.InternalApi
import akka.cluster.ddata.PruningState.PruningPerformed
import akka.util.ccompat._
import akka.util.ccompat.JavaConverters._
/**
* INTERNAL API

View file

@ -8,19 +8,21 @@ import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.util.zip.GZIPInputStream
import java.util.zip.GZIPOutputStream
import scala.annotation.tailrec
import scala.collection.immutable.TreeMap
import akka.util.ccompat.JavaConverters._
import akka.actor.ActorRef
import akka.actor.Address
import akka.actor.ExtendedActorSystem
import akka.cluster.UniqueAddress
import akka.cluster.ddata.VersionVector
import akka.cluster.ddata.protobuf.msg.{ ReplicatorMessages => dm }
import akka.serialization._
import akka.protobufv3.internal.ByteString
import akka.protobufv3.internal.MessageLite
import akka.cluster.ddata.VersionVector
import akka.serialization._
import akka.util.ccompat._
import akka.util.ccompat.JavaConverters._
/**
* Some useful serialization helper methods.

View file

@ -7,6 +7,10 @@ package akka.cluster.ddata
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.util.control.NoStackTrace
import com.typesafe.config.ConfigFactory
import org.scalatest.CancelAfterFailure
import akka.actor.Actor
import akka.actor.ActorRef
import akka.actor.ActorSystem
@ -16,8 +20,6 @@ import akka.remote.testconductor.RoleName
import akka.remote.testkit.MultiNodeConfig
import akka.remote.testkit.MultiNodeSpec
import akka.testkit._
import com.typesafe.config.ConfigFactory
import org.scalatest.CancelAfterFailure
final case class DurableDataSpecConfig(writeBehind: Boolean) extends MultiNodeConfig {
val first = role("first")

View file

@ -4,18 +4,19 @@
package akka.cluster.ddata
import scala.concurrent.Await
import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import akka.actor.ActorRef
import akka.actor.ActorSystem
import akka.cluster.Cluster
import akka.cluster.MemberStatus
import akka.remote.testconductor.RoleName
import akka.remote.testkit.MultiNodeConfig
import akka.remote.testkit.MultiNodeSpec
import akka.testkit._
import com.typesafe.config.ConfigFactory
import akka.actor.ActorSystem
import akka.actor.ActorRef
import scala.concurrent.Await
import akka.cluster.MemberStatus
import akka.util.ccompat._
@ccompatUsedUntil213

View file

@ -4,16 +4,18 @@
package akka.cluster.ddata
import scala.concurrent.duration._
import java.util.concurrent.ThreadLocalRandom
import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import akka.cluster.Cluster
import akka.remote.testconductor.RoleName
import akka.remote.testkit.MultiNodeConfig
import akka.remote.testkit.MultiNodeSpec
import akka.remote.transport.ThrottlerTransportAdapter.Direction
import akka.testkit._
import com.typesafe.config.ConfigFactory
object JepsenInspiredInsertSpec extends MultiNodeConfig {
val controller = role("controller")

View file

@ -6,6 +6,9 @@ package akka.cluster.ddata
import scala.concurrent.Await
import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import akka.actor.Actor
import akka.actor.ActorRef
import akka.actor.Deploy
@ -15,7 +18,6 @@ import akka.remote.testconductor.RoleName
import akka.remote.testkit.MultiNodeConfig
import akka.remote.testkit.MultiNodeSpec
import akka.testkit._
import com.typesafe.config.ConfigFactory
object PerformanceSpec extends MultiNodeConfig {
val n1 = role("n1")

View file

@ -6,13 +6,14 @@ package akka.cluster.ddata
import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import akka.cluster.Cluster
import akka.remote.testconductor.RoleName
import akka.remote.testkit.MultiNodeConfig
import akka.remote.testkit.MultiNodeSpec
import akka.remote.transport.ThrottlerTransportAdapter.Direction
import akka.testkit._
import com.typesafe.config.ConfigFactory
object ReplicatorChaosSpec extends MultiNodeConfig {
val first = role("first")
@ -38,8 +39,8 @@ class ReplicatorChaosSpecMultiJvmNode4 extends ReplicatorChaosSpec
class ReplicatorChaosSpecMultiJvmNode5 extends ReplicatorChaosSpec
class ReplicatorChaosSpec extends MultiNodeSpec(ReplicatorChaosSpec) with STMultiNodeSpec with ImplicitSender {
import ReplicatorChaosSpec._
import Replicator._
import ReplicatorChaosSpec._
override def initialParticipants = roles.size

View file

@ -8,6 +8,8 @@ import java.util.concurrent.ThreadLocalRandom
import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import akka.cluster.Cluster
import akka.cluster.ddata.Replicator._
import akka.remote.testconductor.RoleName
@ -15,7 +17,6 @@ import akka.remote.testkit.MultiNodeConfig
import akka.remote.testkit.MultiNodeSpec
import akka.serialization.jackson.CborSerializable
import akka.testkit._
import com.typesafe.config.ConfigFactory
object ReplicatorDeltaSpec extends MultiNodeConfig {
val first = role("first")

View file

@ -7,14 +7,16 @@ package akka.cluster.ddata
import java.util.concurrent.ThreadLocalRandom
import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import akka.cluster.Cluster
import akka.cluster.ddata.Replicator._
import akka.event.Logging.Error
import akka.remote.testconductor.RoleName
import akka.remote.testkit.MultiNodeConfig
import akka.remote.testkit.MultiNodeSpec
import akka.testkit._
import com.typesafe.config.ConfigFactory
import akka.event.Logging.Error
object ReplicatorMapDeltaSpec extends MultiNodeConfig {
val first = role("first")

View file

@ -6,13 +6,14 @@ package akka.cluster.ddata
import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import akka.cluster.Cluster
import akka.remote.testconductor.RoleName
import akka.remote.testkit.MultiNodeConfig
import akka.remote.testkit.MultiNodeSpec
import akka.remote.transport.ThrottlerTransportAdapter.Direction
import akka.testkit._
import com.typesafe.config.ConfigFactory
object ReplicatorORSetDeltaSpec extends MultiNodeConfig {
val first = role("first")

View file

@ -6,6 +6,8 @@ package akka.cluster.ddata
import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import akka.cluster.Cluster
import akka.cluster.ClusterEvent.InitialStateAsEvents
import akka.cluster.ClusterEvent.MemberUp
@ -13,7 +15,6 @@ import akka.remote.testconductor.RoleName
import akka.remote.testkit.MultiNodeConfig
import akka.remote.testkit.MultiNodeSpec
import akka.testkit._
import com.typesafe.config.ConfigFactory
object ReplicatorPruningSpec extends MultiNodeConfig {
val first = role("first")
@ -36,8 +37,8 @@ class ReplicatorPruningSpecMultiJvmNode2 extends ReplicatorPruningSpec
class ReplicatorPruningSpecMultiJvmNode3 extends ReplicatorPruningSpec
class ReplicatorPruningSpec extends MultiNodeSpec(ReplicatorPruningSpec) with STMultiNodeSpec with ImplicitSender {
import ReplicatorPruningSpec._
import Replicator._
import ReplicatorPruningSpec._
override def initialParticipants = roles.size

View file

@ -7,15 +7,16 @@ package akka.cluster.ddata
import scala.concurrent.Await
import scala.concurrent.duration._
import akka.pattern.ask
import com.typesafe.config.ConfigFactory
import akka.cluster.Cluster
import akka.pattern.ask
import akka.remote.testconductor.RoleName
import akka.remote.testkit.MultiNodeConfig
import akka.remote.testkit.MultiNodeSpec
import akka.remote.transport.ThrottlerTransportAdapter.Direction
import akka.testkit._
import akka.util.Timeout
import com.typesafe.config.ConfigFactory
object ReplicatorSpec extends MultiNodeConfig {
val first = role("first")
@ -38,8 +39,8 @@ class ReplicatorSpecMultiJvmNode2 extends ReplicatorSpec
class ReplicatorSpecMultiJvmNode3 extends ReplicatorSpec
class ReplicatorSpec extends MultiNodeSpec(ReplicatorSpec) with STMultiNodeSpec with ImplicitSender {
import ReplicatorSpec._
import Replicator._
import ReplicatorSpec._
override def initialParticipants = roles.size

View file

@ -4,11 +4,12 @@
package akka.cluster.ddata
import akka.remote.testkit.MultiNodeSpecCallbacks
import org.scalatest.BeforeAndAfterAll
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpecLike
import akka.remote.testkit.MultiNodeSpecCallbacks
/**
* Hooks up MultiNodeSpec with ScalaTest
*/

View file

@ -4,11 +4,12 @@
package akka.cluster.ddata
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import akka.actor.Address
import akka.cluster.UniqueAddress
import akka.cluster.ddata.Replicator.Internal.DataEnvelope
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
class DataEnvelopeSpec extends AnyWordSpec with Matchers {
import PruningState._

View file

@ -4,6 +4,10 @@
package akka.cluster.ddata
import org.scalactic.TypeCheckedTripleEquals
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import akka.actor.Address
import akka.cluster.UniqueAddress
import akka.cluster.ddata.Key.KeyId
@ -11,9 +15,6 @@ import akka.cluster.ddata.Replicator.Internal.DataEnvelope
import akka.cluster.ddata.Replicator.Internal.Delta
import akka.cluster.ddata.Replicator.Internal.DeltaPropagation
import akka.cluster.ddata.Replicator.Internal.DeltaPropagation.NoDeltaPlaceholder
import org.scalactic.TypeCheckedTripleEquals
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
object DeltaPropagationSelectorSpec {
class TestSelector(val selfUniqueAddress: UniqueAddress, override val allNodes: Vector[UniqueAddress])

View file

@ -4,10 +4,11 @@
package akka.cluster.ddata
import akka.cluster.ddata.Replicator.Changed
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import akka.cluster.ddata.Replicator.Changed
class FlagSpec extends AnyWordSpec with Matchers {
"A Flag" must {

View file

@ -4,11 +4,12 @@
package akka.cluster.ddata
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import akka.actor.Address
import akka.cluster.UniqueAddress
import akka.cluster.ddata.Replicator.Changed
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
class GCounterSpec extends AnyWordSpec with Matchers {
val node1 = UniqueAddress(Address("akka", "Sys", "localhost", 2551), 1L)

View file

@ -4,10 +4,11 @@
package akka.cluster.ddata
import akka.cluster.ddata.Replicator.Changed
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import akka.cluster.ddata.Replicator.Changed
class GSetSpec extends AnyWordSpec with Matchers {
val user1 = """{"username":"john","password":"coltrane"}"""

View file

@ -4,11 +4,12 @@
package akka.cluster.ddata
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import akka.actor.Address
import akka.cluster.UniqueAddress
import akka.cluster.ddata.Replicator.Changed
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
class LWWMapSpec extends AnyWordSpec with Matchers {
import LWWRegister.defaultClock

View file

@ -4,11 +4,12 @@
package akka.cluster.ddata
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import akka.actor.Address
import akka.cluster.UniqueAddress
import akka.cluster.ddata.Replicator.Changed
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
class LWWRegisterSpec extends AnyWordSpec with Matchers {
import LWWRegister.defaultClock

View file

@ -4,16 +4,17 @@
package akka.cluster.ddata
import com.typesafe.config.ConfigFactory
import org.scalatest.BeforeAndAfterAll
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpecLike
import akka.actor.Actor
import akka.actor.ActorSystem
import akka.actor.Props
import akka.actor.Stash
import akka.testkit.ImplicitSender
import akka.testkit.TestKit
import com.typesafe.config.ConfigFactory
import org.scalatest.BeforeAndAfterAll
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpecLike
object LocalConcurrencySpec {

View file

@ -8,11 +8,12 @@ import java.util.concurrent.ThreadLocalRandom
import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import akka.actor.Actor
import akka.actor.ActorLogging
import akka.actor.ActorSystem
import akka.actor.Props
import com.typesafe.config.ConfigFactory
/**
* This "sample" simulates lots of data entries, and can be used for

View file

@ -4,12 +4,13 @@
package akka.cluster.ddata
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import akka.actor.Address
import akka.cluster.UniqueAddress
import akka.cluster.ddata.ORSet.AddDeltaOp
import akka.cluster.ddata.Replicator.Changed
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
class ORMapSpec extends AnyWordSpec with Matchers {

View file

@ -4,11 +4,12 @@
package akka.cluster.ddata
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import akka.actor.Address
import akka.cluster.UniqueAddress
import akka.cluster.ddata.Replicator.Changed
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
class ORMultiMapSpec extends AnyWordSpec with Matchers {

View file

@ -6,11 +6,12 @@ package akka.cluster.ddata
import scala.collection.immutable.TreeMap
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import akka.actor.Address
import akka.cluster.UniqueAddress
import akka.cluster.ddata.Replicator.Changed
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
class ORSetSpec extends AnyWordSpec with Matchers {

View file

@ -4,11 +4,12 @@
package akka.cluster.ddata
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import akka.actor.Address
import akka.cluster.UniqueAddress
import akka.cluster.ddata.Replicator.Changed
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
class PNCounterMapSpec extends AnyWordSpec with Matchers {

View file

@ -4,11 +4,12 @@
package akka.cluster.ddata
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import akka.actor.Address
import akka.cluster.UniqueAddress
import akka.cluster.ddata.Replicator.Changed
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
class PNCounterSpec extends AnyWordSpec with Matchers {
val node1 = UniqueAddress(Address("akka", "Sys", "localhost", 2551), 1L)

View file

@ -4,11 +4,12 @@
package akka.cluster.ddata
import akka.actor.Address
import akka.cluster.UniqueAddress
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import akka.actor.Address
import akka.cluster.UniqueAddress
class PruningStateSpec extends AnyWordSpec with Matchers {
import PruningState._

View file

@ -4,11 +4,12 @@
package akka.cluster.ddata
import akka.testkit.AkkaSpec
import com.typesafe.config.ConfigFactory
import org.scalatest.BeforeAndAfterAll
import org.scalatest.wordspec.AnyWordSpecLike
import akka.testkit.AkkaSpec
object ReplicatorSettingsSpec {
val config = ConfigFactory.parseString("""

View file

@ -4,13 +4,14 @@
package akka.cluster.ddata
import org.scalatest.BeforeAndAfterAll
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpecLike
import akka.actor.ActorSystem
import akka.actor.Address
import akka.cluster.UniqueAddress
import akka.testkit.TestKit
import org.scalatest.BeforeAndAfterAll
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpecLike
class VersionVectorSpec
extends TestKit(ActorSystem("VersionVectorSpec"))

View file

@ -4,6 +4,7 @@
package akka.cluster.ddata
import scala.concurrent.Future
import scala.concurrent.duration._
import akka.actor.Actor
@ -12,14 +13,12 @@ import akka.actor.ActorSelection
import akka.actor.ActorSystem
import akka.actor.Address
import akka.actor.Props
import akka.testkit._
import akka.cluster.ddata.Replicator.Internal._
import akka.cluster.ddata.Replicator._
import akka.remote.RARP
import scala.concurrent.Future
import akka.cluster.Cluster
import akka.cluster.UniqueAddress
import akka.cluster.ddata.Replicator._
import akka.cluster.ddata.Replicator.Internal._
import akka.remote.RARP
import akka.testkit._
object WriteAggregatorSpec {

View file

@ -6,25 +6,26 @@ package akka.cluster.ddata.protobuf
import java.util.Base64
import akka.actor.ActorIdentity
import akka.actor.ActorRef
import com.typesafe.config.ConfigFactory
import org.scalatest.BeforeAndAfterAll
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpecLike
import akka.actor.ActorIdentity
import akka.actor.ActorRef
import akka.actor.ActorSystem
import akka.actor.Address
import akka.actor.ExtendedActorSystem
import akka.actor.Identify
import akka.cluster.ddata._
import akka.cluster.ddata.Replicator.Internal._
import akka.testkit.TestKit
import akka.cluster.UniqueAddress
import akka.remote.RARP
import com.typesafe.config.ConfigFactory
import akka.actor.Props
import akka.actor.RootActorPath
import akka.cluster.Cluster
import akka.cluster.UniqueAddress
import akka.cluster.ddata._
import akka.cluster.ddata.Replicator.Internal._
import akka.remote.RARP
import akka.testkit.TestActors
import akka.testkit.TestKit
class ReplicatedDataSerializerSpec
extends TestKit(

View file

@ -5,29 +5,31 @@
package akka.cluster.ddata.protobuf
import scala.concurrent.duration._
import com.typesafe.config.ConfigFactory
import org.scalatest.BeforeAndAfterAll
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpecLike
import akka.actor.ActorSystem
import akka.actor.Address
import akka.actor.ExtendedActorSystem
import akka.actor.Props
import akka.cluster.UniqueAddress
import akka.cluster.ddata.DurableStore.DurableDataEnvelope
import akka.cluster.ddata.GCounter
import akka.cluster.ddata.GSet
import akka.cluster.ddata.GSetKey
import akka.cluster.ddata.ORMultiMap
import akka.cluster.ddata.ORSet
import akka.cluster.ddata.PruningState.PruningInitialized
import akka.cluster.ddata.PruningState.PruningPerformed
import akka.cluster.ddata.Replicator._
import akka.cluster.ddata.Replicator.Internal._
import akka.cluster.ddata.VersionVector
import akka.remote.RARP
import akka.testkit.TestKit
import akka.util.{ unused, ByteString }
import akka.cluster.UniqueAddress
import akka.remote.RARP
import com.typesafe.config.ConfigFactory
import akka.cluster.ddata.DurableStore.DurableDataEnvelope
import akka.cluster.ddata.GCounter
import akka.cluster.ddata.VersionVector
import akka.cluster.ddata.ORSet
import akka.cluster.ddata.ORMultiMap
class ReplicatorMessageSerializerSpec
extends TestKit(