Merge pull request #2047 from drexin/wip-3858-make-case-classes-final-drexin

=all #3858 Make case classes final
This commit is contained in:
Roland Kuhn 2014-03-11 16:06:31 +01:00
commit 4dd5fe3257
188 changed files with 764 additions and 765 deletions

View file

@ -227,12 +227,12 @@ private[cluster] object StressMultiJvmSpec extends MultiNodeConfig {
def form: String = d.formatted("%.2f")
}
case class ClusterResult(
final case class ClusterResult(
address: Address,
duration: Duration,
clusterStats: GossipStats)
case class AggregatedClusterResult(title: String, duration: Duration, clusterStats: GossipStats)
final case class AggregatedClusterResult(title: String, duration: Duration, clusterStats: GossipStats)
/**
* Central aggregator of cluster statistics and metrics.
@ -652,29 +652,29 @@ private[cluster] object StressMultiJvmSpec extends MultiNodeConfig {
case object RetryTick
case object ReportTick
case object PhiTick
case class PhiResult(from: Address, phiValues: immutable.SortedSet[PhiValue])
case class PhiValue(address: Address, countAboveOne: Int, count: Int, max: Double) extends Ordered[PhiValue] {
final case class PhiResult(from: Address, phiValues: immutable.SortedSet[PhiValue])
final case class PhiValue(address: Address, countAboveOne: Int, count: Int, max: Double) extends Ordered[PhiValue] {
import akka.cluster.Member.addressOrdering
def compare(that: PhiValue) = addressOrdering.compare(this.address, that.address)
}
case class ReportTo(ref: Option[ActorRef])
case class StatsResult(from: Address, stats: CurrentInternalStats)
final case class ReportTo(ref: Option[ActorRef])
final case class StatsResult(from: Address, stats: CurrentInternalStats)
type JobId = Int
trait Job { def id: JobId }
case class SimpleJob(id: JobId, payload: Any) extends Job
case class TreeJob(id: JobId, payload: Any, idx: Int, levels: Int, width: Int) extends Job
case class Ack(id: JobId)
case class JobState(deadline: Deadline, job: Job)
case class WorkResult(duration: Duration, sendCount: Long, ackCount: Long) {
final case class SimpleJob(id: JobId, payload: Any) extends Job
final case class TreeJob(id: JobId, payload: Any, idx: Int, levels: Int, width: Int) extends Job
final case class Ack(id: JobId)
final case class JobState(deadline: Deadline, job: Job)
final case class WorkResult(duration: Duration, sendCount: Long, ackCount: Long) {
def retryCount: Long = sendCount - ackCount
def jobsPerSecond: Double = ackCount * 1000.0 / duration.toMillis
}
case object SendBatch
case class CreateTree(levels: Int, width: Int)
final case class CreateTree(levels: Int, width: Int)
case object GetChildrenCount
case class ChildrenCount(numberOfChildren: Int, numberOfChildRestarts: Int)
final case class ChildrenCount(numberOfChildren: Int, numberOfChildRestarts: Int)
case object Reset
}