+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:
parent
ea7205eaf7
commit
0e4d41ad33
1534 changed files with 7454 additions and 6165 deletions
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue