Merge branch 'master' into wip-1313-derekjw
This commit is contained in:
commit
a32ca5d70e
46 changed files with 1215 additions and 1063 deletions
|
|
@ -18,7 +18,7 @@ import scala.Some;
|
|||
import scala.Right;
|
||||
|
||||
public class JavaFutureTests {
|
||||
|
||||
|
||||
private final AkkaApplication app = new AkkaApplication();
|
||||
private final Timeout t = app.AkkaConfig().ActorTimeout();
|
||||
private final FutureFactory ff = new FutureFactory(app.dispatcher(), t);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ trait PerformanceTest extends JUnitSuite {
|
|||
|
||||
var stat: DescriptiveStatistics = _
|
||||
|
||||
val resultRepository = BenchResultRepository(app)
|
||||
val resultRepository = BenchResultRepository()
|
||||
lazy val report = new Report(app, resultRepository, compareResultWith)
|
||||
|
||||
type TS <: TradingSystem
|
||||
|
|
@ -107,34 +107,38 @@ trait PerformanceTest extends JUnitSuite {
|
|||
def compareResultWith: Option[String] = None
|
||||
|
||||
def logMeasurement(scenario: String, numberOfClients: Int, durationNs: Long) {
|
||||
try {
|
||||
val name = simpleName(this)
|
||||
val durationS = durationNs.toDouble / 1000000000.0
|
||||
|
||||
val name = simpleName(this)
|
||||
val durationS = durationNs.toDouble / 1000000000.0
|
||||
val percentiles = TreeMap[Int, Long](
|
||||
5 -> (stat.getPercentile(5.0) / 1000).toLong,
|
||||
25 -> (stat.getPercentile(25.0) / 1000).toLong,
|
||||
50 -> (stat.getPercentile(50.0) / 1000).toLong,
|
||||
75 -> (stat.getPercentile(75.0) / 1000).toLong,
|
||||
95 -> (stat.getPercentile(95.0) / 1000).toLong)
|
||||
|
||||
val percentiles = TreeMap[Int, Long](
|
||||
5 -> (stat.getPercentile(5.0) / 1000).toLong,
|
||||
25 -> (stat.getPercentile(25.0) / 1000).toLong,
|
||||
50 -> (stat.getPercentile(50.0) / 1000).toLong,
|
||||
75 -> (stat.getPercentile(75.0) / 1000).toLong,
|
||||
95 -> (stat.getPercentile(95.0) / 1000).toLong)
|
||||
val n = stat.getN * sampling
|
||||
|
||||
val n = stat.getN * sampling
|
||||
val stats = Stats(
|
||||
name,
|
||||
load = numberOfClients,
|
||||
timestamp = TestStart.startTime,
|
||||
durationNanos = durationNs,
|
||||
n = n,
|
||||
min = (stat.getMin / 1000).toLong,
|
||||
max = (stat.getMax / 1000).toLong,
|
||||
mean = (stat.getMean / 1000).toLong,
|
||||
tps = (n.toDouble / durationS),
|
||||
percentiles)
|
||||
|
||||
val stats = Stats(
|
||||
name,
|
||||
load = numberOfClients,
|
||||
timestamp = TestStart.startTime,
|
||||
durationNanos = durationNs,
|
||||
n = n,
|
||||
min = (stat.getMin / 1000).toLong,
|
||||
max = (stat.getMax / 1000).toLong,
|
||||
mean = (stat.getMean / 1000).toLong,
|
||||
tps = (n.toDouble / durationS),
|
||||
percentiles)
|
||||
resultRepository.add(stats)
|
||||
|
||||
resultRepository.add(stats)
|
||||
|
||||
report.html(resultRepository.get(name))
|
||||
report.html(resultRepository.get(name))
|
||||
} catch {
|
||||
// don't fail test due to problems saving bench report
|
||||
case e: Exception ⇒ app.eventHandler.error(this, e.getMessage)
|
||||
}
|
||||
}
|
||||
|
||||
def delay(delayMs: Int) {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import java.io.PrintWriter
|
|||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import scala.collection.mutable.{ Map ⇒ MutableMap }
|
||||
import akka.AkkaApplication
|
||||
|
||||
trait BenchResultRepository {
|
||||
def add(stats: Stats)
|
||||
|
|
@ -23,6 +22,8 @@ trait BenchResultRepository {
|
|||
|
||||
def getWithHistorical(name: String, load: Int): Seq[Stats]
|
||||
|
||||
def isBaseline(stats: Stats): Boolean
|
||||
|
||||
def saveHtmlReport(content: String, name: String): Unit
|
||||
|
||||
def htmlReportUrl(name: String): String
|
||||
|
|
@ -30,10 +31,11 @@ trait BenchResultRepository {
|
|||
}
|
||||
|
||||
object BenchResultRepository {
|
||||
def apply(app: AkkaApplication): BenchResultRepository = new FileBenchResultRepository(app)
|
||||
private val repository = new FileBenchResultRepository
|
||||
def apply(): BenchResultRepository = repository
|
||||
}
|
||||
|
||||
class FileBenchResultRepository(val app: AkkaApplication) extends BenchResultRepository {
|
||||
class FileBenchResultRepository extends BenchResultRepository {
|
||||
private val statsByName = MutableMap[String, Seq[Stats]]()
|
||||
private val baselineStats = MutableMap[Key, Stats]()
|
||||
private val historicalStats = MutableMap[Key, Seq[Stats]]()
|
||||
|
|
@ -59,13 +61,18 @@ class FileBenchResultRepository(val app: AkkaApplication) extends BenchResultRep
|
|||
get(name).find(_.load == load)
|
||||
}
|
||||
|
||||
def isBaseline(stats: Stats): Boolean = {
|
||||
baselineStats.get(Key(stats.name, stats.load)) == Some(stats)
|
||||
}
|
||||
|
||||
def getWithHistorical(name: String, load: Int): Seq[Stats] = {
|
||||
val key = Key(name, load)
|
||||
val historical = historicalStats.getOrElse(key, IndexedSeq.empty)
|
||||
val baseline = baselineStats.get(key)
|
||||
val current = get(name, load)
|
||||
|
||||
(IndexedSeq.empty ++ historical ++ baseline ++ current).takeRight(maxHistorical)
|
||||
val limited = (IndexedSeq.empty ++ historical ++ baseline ++ current).takeRight(maxHistorical)
|
||||
limited.sortBy(_.timestamp)
|
||||
}
|
||||
|
||||
private def loadFiles() {
|
||||
|
|
@ -102,8 +109,8 @@ class FileBenchResultRepository(val app: AkkaApplication) extends BenchResultRep
|
|||
out.writeObject(stats)
|
||||
} catch {
|
||||
case e: Exception ⇒
|
||||
app.eventHandler.error(this, "Failed to save [%s] to [%s], due to [%s]".
|
||||
format(stats, f.getAbsolutePath, e.getMessage))
|
||||
val errMsg = "Failed to save [%s] to [%s], due to [%s]".format(stats, f.getAbsolutePath, e.getMessage)
|
||||
throw new RuntimeException(errMsg)
|
||||
} finally {
|
||||
if (out ne null) try { out.close() } catch { case ignore: Exception ⇒ }
|
||||
}
|
||||
|
|
@ -119,8 +126,6 @@ class FileBenchResultRepository(val app: AkkaApplication) extends BenchResultRep
|
|||
Some(stats)
|
||||
} catch {
|
||||
case e: Throwable ⇒
|
||||
app.eventHandler.error(this, "Failed to load from [%s], due to [%s]".
|
||||
format(f.getAbsolutePath, e.getMessage))
|
||||
None
|
||||
} finally {
|
||||
if (in ne null) try { in.close() } catch { case ignore: Exception ⇒ }
|
||||
|
|
@ -143,8 +148,8 @@ class FileBenchResultRepository(val app: AkkaApplication) extends BenchResultRep
|
|||
writer.flush()
|
||||
} catch {
|
||||
case e: Exception ⇒
|
||||
app.eventHandler.error(this, "Failed to save report to [%s], due to [%s]".
|
||||
format(f.getAbsolutePath, e.getMessage))
|
||||
val errMsg = "Failed to save report to [%s], due to [%s]".format(f.getAbsolutePath, e.getMessage)
|
||||
throw new RuntimeException(errMsg)
|
||||
} finally {
|
||||
if (writer ne null) try { writer.close() } catch { case ignore: Exception ⇒ }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,72 @@ object GoogleChartBuilder {
|
|||
val ChartWidth = 750
|
||||
val ChartHeight = 400
|
||||
|
||||
/**
|
||||
* Builds a bar chart for tps in the statistics.
|
||||
*/
|
||||
def tpsChartUrl(statsByTimestamp: TreeMap[Long, Seq[Stats]], title: String, legend: Stats ⇒ String): String = {
|
||||
if (statsByTimestamp.isEmpty) return ""
|
||||
|
||||
val loads = statsByTimestamp.values.head.map(_.load)
|
||||
val allStats = statsByTimestamp.values.flatten
|
||||
|
||||
val sb = new StringBuilder
|
||||
sb.append(BaseUrl)
|
||||
// bar chart
|
||||
sb.append("cht=bvg")
|
||||
sb.append("&")
|
||||
// size
|
||||
sb.append("chs=").append(ChartWidth).append("x").append(ChartHeight)
|
||||
sb.append("&")
|
||||
// title
|
||||
sb.append("chtt=").append(urlEncode(title))
|
||||
sb.append("&")
|
||||
// axis locations
|
||||
sb.append("chxt=y,x")
|
||||
sb.append("&")
|
||||
// labels
|
||||
sb.append("chxl=1:|")
|
||||
sb.append(loads.mkString("|"))
|
||||
sb.append("&")
|
||||
|
||||
// label color and font
|
||||
//sb.append("chxs=2,D65D82,11.5,0,lt,D65D82")
|
||||
//sb.append("&")
|
||||
|
||||
// legend
|
||||
val legendStats = statsByTimestamp.values.map(_.head).toSeq
|
||||
appendLegend(legendStats, sb, legend)
|
||||
sb.append("&")
|
||||
// bar spacing
|
||||
sb.append("chbh=a,4,20")
|
||||
sb.append("&")
|
||||
// bar colors
|
||||
barColors(statsByTimestamp.size, sb)
|
||||
sb.append("&")
|
||||
|
||||
// data series
|
||||
val loadStr = loads.mkString(",")
|
||||
sb.append("chd=t:")
|
||||
val maxValue = allStats.map(_.tps).max
|
||||
val tpsSeries: Iterable[String] =
|
||||
for (statsSeq ← statsByTimestamp.values) yield {
|
||||
statsSeq.map(_.tps).mkString(",")
|
||||
}
|
||||
sb.append(tpsSeries.mkString("|"))
|
||||
|
||||
// y range
|
||||
sb.append("&")
|
||||
sb.append("chxr=0,0,").append(maxValue)
|
||||
sb.append("&")
|
||||
sb.append("chds=0,").append(maxValue)
|
||||
sb.append("&")
|
||||
|
||||
// grid lines
|
||||
appendGridSpacing(maxValue.toLong, sb)
|
||||
|
||||
return sb.toString
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a bar chart for all percentiles and the mean in the statistics.
|
||||
*/
|
||||
|
|
@ -113,6 +179,11 @@ object GoogleChartBuilder {
|
|||
sb.append(series.mkString("|"))
|
||||
}
|
||||
|
||||
private def dataSeries(values: Seq[Double], sb: StringBuilder) {
|
||||
val series = values.map(formatDouble(_))
|
||||
sb.append(series.mkString("|"))
|
||||
}
|
||||
|
||||
private def appendGridSpacing(maxValue: Long, sb: StringBuilder) {
|
||||
sb.append("chg=0,10")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,12 @@ import java.util.Date
|
|||
import scala.collection.JavaConversions.asScalaBuffer
|
||||
import scala.collection.JavaConversions.enumerationAsScalaIterator
|
||||
import akka.AkkaApplication
|
||||
import scala.collection.immutable.TreeMap
|
||||
|
||||
class Report(app: AkkaApplication,
|
||||
resultRepository: BenchResultRepository,
|
||||
compareResultWith: Option[String] = None) {
|
||||
class Report(
|
||||
app: AkkaApplication,
|
||||
resultRepository: BenchResultRepository,
|
||||
compareResultWith: Option[String] = None) {
|
||||
|
||||
private def log = System.getProperty("benchmark.logResult", "true").toBoolean
|
||||
|
||||
|
|
@ -34,6 +36,8 @@ class Report(app: AkkaApplication,
|
|||
sb.append(img(percentilesAndMeanChart(current)))
|
||||
sb.append(img(latencyAndThroughputChart(current)))
|
||||
|
||||
compareWithHistoricalTpsChart(statistics).foreach(url ⇒ sb.append(img(url)))
|
||||
|
||||
for (stats ← statistics) {
|
||||
compareWithHistoricalPercentiliesAndMeanChart(stats).foreach(url ⇒ sb.append(img(url)))
|
||||
}
|
||||
|
|
@ -62,6 +66,11 @@ class Report(app: AkkaApplication,
|
|||
url, GoogleChartBuilder.ChartWidth, GoogleChartBuilder.ChartHeight) + "\n"
|
||||
}
|
||||
|
||||
protected def timeLegend(stats: Stats): String = {
|
||||
val baseline = if (resultRepository.isBaseline(stats)) " *" else ""
|
||||
legendTimeFormat.format(new Date(stats.timestamp)) + baseline
|
||||
}
|
||||
|
||||
def percentilesAndMeanChart(stats: Stats): String = {
|
||||
val chartTitle = stats.name + " Percentiles and Mean (microseconds)"
|
||||
val chartUrl = GoogleChartBuilder.percentilesAndMeanChartUrl(resultRepository.get(stats.name), chartTitle, _.load + " clients")
|
||||
|
|
@ -83,14 +92,36 @@ class Report(app: AkkaApplication,
|
|||
val withHistorical = resultRepository.getWithHistorical(stats.name, stats.load)
|
||||
if (withHistorical.size > 1) {
|
||||
val chartTitle = stats.name + " vs. historical, " + stats.load + " clients" + ", Percentiles and Mean (microseconds)"
|
||||
val chartUrl = GoogleChartBuilder.percentilesAndMeanChartUrl(withHistorical, chartTitle,
|
||||
stats ⇒ legendTimeFormat.format(new Date(stats.timestamp)))
|
||||
val chartUrl = GoogleChartBuilder.percentilesAndMeanChartUrl(withHistorical, chartTitle, timeLegend)
|
||||
Some(chartUrl)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
def compareWithHistoricalTpsChart(statistics: Seq[Stats]): Option[String] = {
|
||||
|
||||
if (statistics.isEmpty) {
|
||||
None
|
||||
} else {
|
||||
val histTimestamps = resultRepository.getWithHistorical(statistics.head.name, statistics.head.load).map(_.timestamp)
|
||||
val statsByTimestamp = TreeMap[Long, Seq[Stats]]() ++
|
||||
(for (ts ← histTimestamps) yield {
|
||||
val seq =
|
||||
for (stats ← statistics) yield {
|
||||
val withHistorical: Seq[Stats] = resultRepository.getWithHistorical(stats.name, stats.load)
|
||||
val cell = withHistorical.find(_.timestamp == ts)
|
||||
cell.getOrElse(Stats(stats.name, stats.load, ts))
|
||||
}
|
||||
(ts, seq)
|
||||
})
|
||||
|
||||
val chartTitle = statistics.last.name + " vs. historical, Throughput (TPS)"
|
||||
val chartUrl = GoogleChartBuilder.tpsChartUrl(statsByTimestamp, chartTitle, timeLegend)
|
||||
Some(chartUrl)
|
||||
}
|
||||
}
|
||||
|
||||
def latencyAndThroughputChart(stats: Stats): String = {
|
||||
val chartTitle = stats.name + " Latency (microseconds) and Throughput (TPS)"
|
||||
val chartUrl = GoogleChartBuilder.latencyAndThroughputChartUrl(resultRepository.get(stats.name), chartTitle)
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@ case class Stats(
|
|||
name: String,
|
||||
load: Int,
|
||||
timestamp: Long = System.currentTimeMillis,
|
||||
durationNanos: Long,
|
||||
n: Long,
|
||||
min: Long,
|
||||
max: Long,
|
||||
mean: Double,
|
||||
tps: Double,
|
||||
percentiles: TreeMap[Int, Long]) {
|
||||
durationNanos: Long = 0L,
|
||||
n: Long = 0L,
|
||||
min: Long = 0L,
|
||||
max: Long = 0L,
|
||||
mean: Double = 0.0,
|
||||
tps: Double = 0.0,
|
||||
percentiles: TreeMap[Int, Long] = TreeMap.empty) {
|
||||
|
||||
def median: Long = percentiles(50)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public final class UUIDGen {
|
|||
* The last time value. Used to remove duplicate UUIDs.
|
||||
*/
|
||||
private final static AtomicLong lastTime = new AtomicLong(Long.MIN_VALUE);
|
||||
|
||||
|
||||
/**
|
||||
* The cached MAC address.
|
||||
*/
|
||||
|
|
@ -233,11 +233,11 @@ public final class UUIDGen {
|
|||
public static long newTime() {
|
||||
return createTime(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new time field from the given timestamp. Note that even identical
|
||||
* values of <code>currentTimeMillis</code> will produce different time fields.
|
||||
*
|
||||
*
|
||||
* @param currentTimeMillis the timestamp
|
||||
* @return a new time value
|
||||
* @see UUID#getTime()
|
||||
|
|
@ -275,10 +275,10 @@ public final class UUIDGen {
|
|||
return time;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the MAC address. Not guaranteed to return anything.
|
||||
*
|
||||
*
|
||||
* @return the MAC address, may be <code>null</code>
|
||||
*/
|
||||
public static String getMACAddress() {
|
||||
|
|
|
|||
|
|
@ -119,8 +119,9 @@ case class UnhandledMessageException(msg: Any, ref: ActorRef = null) extends Exc
|
|||
|
||||
/**
|
||||
* Classes for passing status back to the sender.
|
||||
* Used for internal ACKing protocol. But exposed as utility class for user-specific ACKing protocols as well.
|
||||
*/
|
||||
object Status { //FIXME Why does this exist at all?
|
||||
object Status {
|
||||
sealed trait Status extends Serializable
|
||||
case class Success(status: AnyRef) extends Status
|
||||
case class Failure(cause: Throwable) extends Status
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ case class ChildRestartStats(var maxNrOfRetriesCount: Int = 0, var restartTimeWi
|
|||
|
||||
private def retriesInWindowOkay(retries: Int, window: Int): Boolean = {
|
||||
/*
|
||||
* Simple window algorithm: window is kept open for a certain time
|
||||
* after a restart and if enough restarts happen during this time, it
|
||||
* Simple window algorithm: window is kept open for a certain time
|
||||
* after a restart and if enough restarts happen during this time, it
|
||||
* denies. Otherwise window closes and the scheme starts over.
|
||||
*/
|
||||
val retriesDone = maxNrOfRetriesCount + 1
|
||||
|
|
@ -181,7 +181,7 @@ case class AllForOneStrategy(decider: FaultHandlingStrategy.Decider,
|
|||
if (withinTimeRange < 0) None else Some(withinTimeRange))
|
||||
|
||||
/*
|
||||
* this is a performance optimization to avoid re-allocating the pairs upon
|
||||
* this is a performance optimization to avoid re-allocating the pairs upon
|
||||
* every call to requestRestartPermission, assuming that strategies are shared
|
||||
* across actors and thus this field does not take up much space
|
||||
*/
|
||||
|
|
@ -238,7 +238,7 @@ case class OneForOneStrategy(decider: FaultHandlingStrategy.Decider,
|
|||
if (withinTimeRange < 0) None else Some(withinTimeRange))
|
||||
|
||||
/*
|
||||
* this is a performance optimization to avoid re-allocating the pairs upon
|
||||
* this is a performance optimization to avoid re-allocating the pairs upon
|
||||
* every call to requestRestartPermission, assuming that strategies are shared
|
||||
* across actors and thus this field does not take up much space
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -153,4 +153,4 @@ abstract class PriorityGenerator extends java.util.Comparator[Envelope] {
|
|||
|
||||
final def compare(thisMessage: Envelope, thatMessage: Envelope): Int =
|
||||
gen(thisMessage.message) - gen(thatMessage.message)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ trait DeathWatch extends ActorEventBus with ActorClassifier {
|
|||
type Event = Terminated
|
||||
|
||||
protected final def classify(event: Event): Classifier = event.actor
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -262,4 +262,4 @@ trait ActorClassification { self: ActorEventBus with ActorClassifier ⇒
|
|||
def subscribe(subscriber: Subscriber, to: Classifier): Boolean = associate(to, subscriber)
|
||||
def unsubscribe(subscriber: Subscriber, from: Classifier): Boolean = dissociate(from, subscriber)
|
||||
def unsubscribe(subscriber: Subscriber): Unit = dissociate(subscriber)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,4 +35,4 @@ abstract class ScanningEventBus[E, S, C] extends EventBus with ScanningClassific
|
|||
|
||||
abstract class ActorEventBus[E] extends akka.event.ActorEventBus with ActorClassification with ActorClassifier {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import akka.actor.Actor
|
|||
trait Logging {
|
||||
|
||||
/*
|
||||
* implement these as precisely as needed/possible: always returning true
|
||||
* implement these as precisely as needed/possible: always returning true
|
||||
* just makes the notify... methods be called every time.
|
||||
*/
|
||||
def isErrorEnabled: Boolean
|
||||
|
|
@ -20,7 +20,7 @@ trait Logging {
|
|||
def isDebugEnabled: Boolean
|
||||
|
||||
/*
|
||||
* These actually implement the passing on of the messages to be logged.
|
||||
* These actually implement the passing on of the messages to be logged.
|
||||
* Will not be called if is...Enabled returned false.
|
||||
*/
|
||||
protected def notifyError(cause: Throwable, message: String)
|
||||
|
|
@ -105,4 +105,4 @@ class EventHandlerLogging(val eventHandler: EventHandler, val loggingInstance: A
|
|||
|
||||
protected def notifyDebug(message: String) { eventHandler.notifyListeners(Debug(loggingInstance, message)) }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import java.net.InetSocketAddress
|
|||
/**
|
||||
* An Iterable that also contains a version.
|
||||
*/
|
||||
// FIXME REMOVE VersionedIterable
|
||||
trait VersionedIterable[A] {
|
||||
val version: Long
|
||||
|
||||
|
|
|
|||
|
|
@ -59,8 +59,6 @@ object RouterType {
|
|||
|
||||
/**
|
||||
* A RouterType that select the connection based on the least amount of ram used.
|
||||
*
|
||||
* FIXME: this is extremely vague currently since there are so many ways to define least amount of ram.
|
||||
*/
|
||||
object LeastRAM extends RouterType
|
||||
|
||||
|
|
|
|||
|
|
@ -142,8 +142,6 @@ private[akka] class RoutedActorRef(val routedProps: RoutedProps, override val ad
|
|||
/**
|
||||
* An Abstract Router implementation that already provides the basic infrastructure so that a concrete
|
||||
* Router only needs to implement the next method.
|
||||
*
|
||||
* FIXME: this is also the location where message buffering should be done in case of failure.
|
||||
*/
|
||||
trait BasicRouter extends Router {
|
||||
|
||||
|
|
@ -258,15 +256,17 @@ class DirectRouter extends BasicRouter {
|
|||
* @author <a href="http://jonasboner.com">Jonas Bonér</a>
|
||||
*/
|
||||
class RandomRouter extends BasicRouter {
|
||||
import java.security.SecureRandom
|
||||
|
||||
private val state = new AtomicReference[RandomRouterState]
|
||||
|
||||
//FIXME: threadlocal random?
|
||||
private val random = new java.util.Random(System.nanoTime)
|
||||
private val random = new ThreadLocal[SecureRandom] {
|
||||
override def initialValue = SecureRandom.getInstance("SHA1PRNG")
|
||||
}
|
||||
|
||||
def next: Option[ActorRef] = currentState.array match {
|
||||
case a if a.isEmpty ⇒ None
|
||||
case a ⇒ Some(a(random.nextInt(a.length)))
|
||||
case a ⇒ Some(a(random.get.nextInt(a.length)))
|
||||
}
|
||||
|
||||
@tailrec
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ akka.event-handler-level = "WARNING"
|
|||
akka.actor.deployment.service-test.router = "round-robin"
|
||||
akka.actor.deployment.service-test.cluster.preferred-nodes = ["node:node2","node:node3"]
|
||||
akka.actor.deployment.service-test.nr-of-instances = 2
|
||||
akka.remote.client.buffering.retry-message-send-on-failure = false
|
||||
akka.remote.client.buffering.retry-message-send-on-failure = false
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@ akka.enabled-modules = ["cluster"]
|
|||
akka.event-handlers = ["akka.testkit.TestEventListener"]
|
||||
akka.event-handler-level = "WARNING"
|
||||
akka.actor.deployment.service-hello.router = "direct"
|
||||
akka.actor.deployment.service-hello.cluster.preferred-nodes = ["node:node2"]
|
||||
akka.actor.deployment.service-hello.cluster.preferred-nodes = ["node:node2"]
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ akka.actor.deployment.service-node1.cluster.preferred-nodes = ["node:node1"]
|
|||
akka.actor.deployment.service-node1.nr-of-instances = 1
|
||||
akka.actor.deployment.service-node2.router = "random"
|
||||
akka.actor.deployment.service-node2.cluster.preferred-nodes = ["node:node2"]
|
||||
akka.actor.deployment.service-node2.nr-of-instances = 1
|
||||
akka.actor.deployment.service-node2.nr-of-instances = 1
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ akka.actor.deployment.service-node1.cluster.preferred-nodes = ["node:node1"]
|
|||
akka.actor.deployment.service-node1.nr-of-instances = 1
|
||||
akka.actor.deployment.service-node2.router = "random"
|
||||
akka.actor.deployment.service-node2.cluster.preferred-nodes = ["node:node2"]
|
||||
akka.actor.deployment.service-node2.nr-of-instances = 1
|
||||
akka.actor.deployment.service-node2.nr-of-instances = 1
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
akka.enabled-modules = ["cluster"]
|
||||
akka.event-handler-level = "WARNING"
|
||||
akka.actor.deployment.service-hello.router = "random"
|
||||
akka.actor.deployment.service-hello.nr-of-instances = 1
|
||||
akka.actor.deployment.service-hello.nr-of-instances = 1
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ akka.actor.deployment.service-hello.router = "round-robin"
|
|||
akka.actor.deployment.service-hello.nr-of-instances = 2
|
||||
akka.actor.deployment.service-hello.cluster.preferred-nodes = ["node:node1","node:node3"]
|
||||
akka.cluster.include-ref-node-in-replica-set = on
|
||||
akka.actor.timeout = 30
|
||||
akka.actor.timeout = 30
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ akka.actor.deployment.service-hello.router = "round-robin"
|
|||
akka.actor.deployment.service-hello.nr-of-instances = 2
|
||||
akka.actor.deployment.service-hello.cluster.preferred-nodes = ["node:node1","node:node3"]
|
||||
akka.cluster.include-ref-node-in-replica-set = on
|
||||
akka.actor.timeout = 30
|
||||
akka.actor.timeout = 30
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ akka.actor.deployment.service-hello.router = "round-robin"
|
|||
akka.actor.deployment.service-hello.nr-of-instances = 2
|
||||
akka.actor.deployment.service-hello.cluster.preferred-nodes = ["node:node1","node:node3"]
|
||||
akka.cluster.include-ref-node-in-replica-set = on
|
||||
akka.actor.timeout = 30
|
||||
akka.actor.timeout = 30
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ akka.actor.deployment.service-node1.cluster.preferred-nodes = ["node:node1"]
|
|||
akka.actor.deployment.service-node1.nr-of-instances = 1
|
||||
akka.actor.deployment.service-node2.router = "round-robin"
|
||||
akka.actor.deployment.service-node2.cluster.preferred-nodes = ["node:node2"]
|
||||
akka.actor.deployment.service-node2.nr-of-instances = 1
|
||||
akka.actor.deployment.service-node2.nr-of-instances = 1
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@ akka.enabled-modules = ["cluster"]
|
|||
akka.event-handler-level = "WARNING"
|
||||
akka.actor.deployment.service-hello.router = "round-robin"
|
||||
akka.actor.deployment.service-hello.cluster.preferred-nodes = ["node:node1"]
|
||||
akka.actor.deployment.service-hello.nr-of-instances = 1
|
||||
akka.actor.deployment.service-hello.nr-of-instances = 1
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
akka.enabled-modules = ["cluster"]
|
||||
akka.event-handler-level = "WARNING"
|
||||
akka.actor.deployment.service-hello.router = "round-robin"
|
||||
akka.actor.deployment.service-hello.nr-of-instances = 1
|
||||
akka.actor.deployment.service-hello.nr-of-instances = 1
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ akka.event-handlers = ["akka.testkit.TestEventListener"]
|
|||
akka.event-handler-level = "WARNING"
|
||||
akka.actor.deployment.service-hello.router = "akka.routing.ScatterGatherFirstCompletedRouter"
|
||||
akka.actor.deployment.service-hello.nr-of-instances = 2
|
||||
akka.actor.timeout = 30
|
||||
akka.actor.timeout = 30
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ akka.event-handlers = ["akka.testkit.TestEventListener"]
|
|||
akka.event-handler-level = "WARNING"
|
||||
akka.actor.deployment.service-hello.router = "akka.routing.ScatterGatherFirstCompletedRouter"
|
||||
akka.actor.deployment.service-hello.nr-of-instances = 2
|
||||
akka.actor.timeout = 30
|
||||
akka.actor.timeout = 30
|
||||
|
|
|
|||
42
akka-docs/general/guaranteed-delivery.rst
Normal file
42
akka-docs/general/guaranteed-delivery.rst
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
|
||||
.. _guaranteed-delivery:
|
||||
|
||||
#########
|
||||
Guaranteed Delivery
|
||||
#########
|
||||
|
||||
|
||||
Guaranteed Delivery
|
||||
=====
|
||||
|
||||
Akka does *not* support guaranteed delivery.
|
||||
|
||||
First it is close to impossible to actually give guarantees like that,
|
||||
second it is extremely costly trying to do so.
|
||||
The network is inherently unreliable and there is no such thing as 100%
|
||||
guarantee delivery, so it can never be guaranteed.
|
||||
|
||||
The question is what to guarantee. That:
|
||||
|
||||
1. The message is sent out on the network?
|
||||
2. The message is received by the other host?
|
||||
3. The message is put on the target actor's mailbox?
|
||||
4. The message is applied to the target actor?
|
||||
5. The message is starting to be executed by the target actor?
|
||||
6. The message is finished executing by the target actor?
|
||||
|
||||
Each one of this have different challenges and costs.
|
||||
|
||||
Akka embraces distributed computing and the network and makes it explicit
|
||||
through message passing, therefore it does not try to lie and emulate a
|
||||
leaky abstraction. This is a model that have been used with great success
|
||||
in Erlang and requires the user to model his application around. You can
|
||||
read more about this approach in the `Erlang documentation`_ (section
|
||||
10.9 and 10.10), Akka follows it closely.
|
||||
|
||||
Bottom line; you as a developer knows what guarantees you need in your
|
||||
application and can solve it fastest and most reliable by explicit ``ACK`` and
|
||||
``RETRY`` (if you really need it, most often you don't). Using Akka's Durable
|
||||
Mailboxes could help with this.
|
||||
|
||||
.. _Erlang documentation: http://www.erlang.org/faq/academic.html
|
||||
|
|
@ -9,4 +9,5 @@ General
|
|||
event-handler
|
||||
slf4j
|
||||
supervision
|
||||
guaranteed-delivery
|
||||
|
||||
|
|
|
|||
|
|
@ -10,20 +10,20 @@ public final class MailboxProtocol {
|
|||
}
|
||||
public interface DurableMailboxMessageProtocolOrBuilder
|
||||
extends com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
|
||||
// required string ownerAddress = 1;
|
||||
boolean hasOwnerAddress();
|
||||
String getOwnerAddress();
|
||||
|
||||
|
||||
// optional string senderAddress = 2;
|
||||
boolean hasSenderAddress();
|
||||
String getSenderAddress();
|
||||
|
||||
|
||||
// optional .UuidProtocol futureUuid = 3;
|
||||
boolean hasFutureUuid();
|
||||
akka.actor.mailbox.MailboxProtocol.UuidProtocol getFutureUuid();
|
||||
akka.actor.mailbox.MailboxProtocol.UuidProtocolOrBuilder getFutureUuidOrBuilder();
|
||||
|
||||
|
||||
// required bytes message = 4;
|
||||
boolean hasMessage();
|
||||
com.google.protobuf.ByteString getMessage();
|
||||
|
|
@ -36,26 +36,26 @@ public final class MailboxProtocol {
|
|||
super(builder);
|
||||
}
|
||||
private DurableMailboxMessageProtocol(boolean noInit) {}
|
||||
|
||||
|
||||
private static final DurableMailboxMessageProtocol defaultInstance;
|
||||
public static DurableMailboxMessageProtocol getDefaultInstance() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
|
||||
public DurableMailboxMessageProtocol getDefaultInstanceForType() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return akka.actor.mailbox.MailboxProtocol.internal_static_DurableMailboxMessageProtocol_descriptor;
|
||||
}
|
||||
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return akka.actor.mailbox.MailboxProtocol.internal_static_DurableMailboxMessageProtocol_fieldAccessorTable;
|
||||
}
|
||||
|
||||
|
||||
private int bitField0_;
|
||||
// required string ownerAddress = 1;
|
||||
public static final int OWNERADDRESS_FIELD_NUMBER = 1;
|
||||
|
|
@ -68,7 +68,7 @@ public final class MailboxProtocol {
|
|||
if (ref instanceof String) {
|
||||
return (String) ref;
|
||||
} else {
|
||||
com.google.protobuf.ByteString bs =
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
String s = bs.toStringUtf8();
|
||||
if (com.google.protobuf.Internal.isValidUtf8(bs)) {
|
||||
|
|
@ -80,7 +80,7 @@ public final class MailboxProtocol {
|
|||
private com.google.protobuf.ByteString getOwnerAddressBytes() {
|
||||
java.lang.Object ref = ownerAddress_;
|
||||
if (ref instanceof String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8((String) ref);
|
||||
ownerAddress_ = b;
|
||||
return b;
|
||||
|
|
@ -88,7 +88,7 @@ public final class MailboxProtocol {
|
|||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// optional string senderAddress = 2;
|
||||
public static final int SENDERADDRESS_FIELD_NUMBER = 2;
|
||||
private java.lang.Object senderAddress_;
|
||||
|
|
@ -100,7 +100,7 @@ public final class MailboxProtocol {
|
|||
if (ref instanceof String) {
|
||||
return (String) ref;
|
||||
} else {
|
||||
com.google.protobuf.ByteString bs =
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
String s = bs.toStringUtf8();
|
||||
if (com.google.protobuf.Internal.isValidUtf8(bs)) {
|
||||
|
|
@ -112,7 +112,7 @@ public final class MailboxProtocol {
|
|||
private com.google.protobuf.ByteString getSenderAddressBytes() {
|
||||
java.lang.Object ref = senderAddress_;
|
||||
if (ref instanceof String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8((String) ref);
|
||||
senderAddress_ = b;
|
||||
return b;
|
||||
|
|
@ -120,7 +120,7 @@ public final class MailboxProtocol {
|
|||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// optional .UuidProtocol futureUuid = 3;
|
||||
public static final int FUTUREUUID_FIELD_NUMBER = 3;
|
||||
private akka.actor.mailbox.MailboxProtocol.UuidProtocol futureUuid_;
|
||||
|
|
@ -133,7 +133,7 @@ public final class MailboxProtocol {
|
|||
public akka.actor.mailbox.MailboxProtocol.UuidProtocolOrBuilder getFutureUuidOrBuilder() {
|
||||
return futureUuid_;
|
||||
}
|
||||
|
||||
|
||||
// required bytes message = 4;
|
||||
public static final int MESSAGE_FIELD_NUMBER = 4;
|
||||
private com.google.protobuf.ByteString message_;
|
||||
|
|
@ -143,7 +143,7 @@ public final class MailboxProtocol {
|
|||
public com.google.protobuf.ByteString getMessage() {
|
||||
return message_;
|
||||
}
|
||||
|
||||
|
||||
private void initFields() {
|
||||
ownerAddress_ = "";
|
||||
senderAddress_ = "";
|
||||
|
|
@ -154,7 +154,7 @@ public final class MailboxProtocol {
|
|||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized != -1) return isInitialized == 1;
|
||||
|
||||
|
||||
if (!hasOwnerAddress()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
|
|
@ -172,7 +172,7 @@ public final class MailboxProtocol {
|
|||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
|
|
@ -190,12 +190,12 @@ public final class MailboxProtocol {
|
|||
}
|
||||
getUnknownFields().writeTo(output);
|
||||
}
|
||||
|
||||
|
||||
private int memoizedSerializedSize = -1;
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
|
||||
size = 0;
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
|
|
@ -217,14 +217,14 @@ public final class MailboxProtocol {
|
|||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@java.lang.Override
|
||||
protected java.lang.Object writeReplace()
|
||||
throws java.io.ObjectStreamException {
|
||||
return super.writeReplace();
|
||||
}
|
||||
|
||||
|
||||
public static akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
|
|
@ -291,14 +291,14 @@ public final class MailboxProtocol {
|
|||
return newBuilder().mergeFrom(input, extensionRegistry)
|
||||
.buildParsed();
|
||||
}
|
||||
|
||||
|
||||
public static Builder newBuilder() { return Builder.create(); }
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder(akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol prototype) {
|
||||
return newBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() { return newBuilder(this); }
|
||||
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
|
||||
|
|
@ -312,17 +312,17 @@ public final class MailboxProtocol {
|
|||
getDescriptor() {
|
||||
return akka.actor.mailbox.MailboxProtocol.internal_static_DurableMailboxMessageProtocol_descriptor;
|
||||
}
|
||||
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return akka.actor.mailbox.MailboxProtocol.internal_static_DurableMailboxMessageProtocol_fieldAccessorTable;
|
||||
}
|
||||
|
||||
|
||||
// Construct using akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
|
||||
private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
|
|
@ -335,7 +335,7 @@ public final class MailboxProtocol {
|
|||
private static Builder create() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
ownerAddress_ = "";
|
||||
|
|
@ -352,20 +352,20 @@ public final class MailboxProtocol {
|
|||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Builder clone() {
|
||||
return create().mergeFrom(buildPartial());
|
||||
}
|
||||
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol.getDescriptor();
|
||||
}
|
||||
|
||||
|
||||
public akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol getDefaultInstanceForType() {
|
||||
return akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol.getDefaultInstance();
|
||||
}
|
||||
|
||||
|
||||
public akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol build() {
|
||||
akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
|
|
@ -373,7 +373,7 @@ public final class MailboxProtocol {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol buildParsed()
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol result = buildPartial();
|
||||
|
|
@ -383,7 +383,7 @@ public final class MailboxProtocol {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol buildPartial() {
|
||||
akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol result = new akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
|
|
@ -412,7 +412,7 @@ public final class MailboxProtocol {
|
|||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol) {
|
||||
return mergeFrom((akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol)other);
|
||||
|
|
@ -421,7 +421,7 @@ public final class MailboxProtocol {
|
|||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Builder mergeFrom(akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol other) {
|
||||
if (other == akka.actor.mailbox.MailboxProtocol.DurableMailboxMessageProtocol.getDefaultInstance()) return this;
|
||||
if (other.hasOwnerAddress()) {
|
||||
|
|
@ -439,25 +439,25 @@ public final class MailboxProtocol {
|
|||
this.mergeUnknownFields(other.getUnknownFields());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public final boolean isInitialized() {
|
||||
if (!hasOwnerAddress()) {
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
if (!hasMessage()) {
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
if (hasFutureUuid()) {
|
||||
if (!getFutureUuid().isInitialized()) {
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
|
|
@ -508,9 +508,9 @@ public final class MailboxProtocol {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private int bitField0_;
|
||||
|
||||
|
||||
// required string ownerAddress = 1;
|
||||
private java.lang.Object ownerAddress_ = "";
|
||||
public boolean hasOwnerAddress() {
|
||||
|
|
@ -546,7 +546,7 @@ public final class MailboxProtocol {
|
|||
ownerAddress_ = value;
|
||||
onChanged();
|
||||
}
|
||||
|
||||
|
||||
// optional string senderAddress = 2;
|
||||
private java.lang.Object senderAddress_ = "";
|
||||
public boolean hasSenderAddress() {
|
||||
|
|
@ -582,7 +582,7 @@ public final class MailboxProtocol {
|
|||
senderAddress_ = value;
|
||||
onChanged();
|
||||
}
|
||||
|
||||
|
||||
// optional .UuidProtocol futureUuid = 3;
|
||||
private akka.actor.mailbox.MailboxProtocol.UuidProtocol futureUuid_ = akka.actor.mailbox.MailboxProtocol.UuidProtocol.getDefaultInstance();
|
||||
private com.google.protobuf.SingleFieldBuilder<
|
||||
|
|
@ -660,7 +660,7 @@ public final class MailboxProtocol {
|
|||
}
|
||||
}
|
||||
private com.google.protobuf.SingleFieldBuilder<
|
||||
akka.actor.mailbox.MailboxProtocol.UuidProtocol, akka.actor.mailbox.MailboxProtocol.UuidProtocol.Builder, akka.actor.mailbox.MailboxProtocol.UuidProtocolOrBuilder>
|
||||
akka.actor.mailbox.MailboxProtocol.UuidProtocol, akka.actor.mailbox.MailboxProtocol.UuidProtocol.Builder, akka.actor.mailbox.MailboxProtocol.UuidProtocolOrBuilder>
|
||||
getFutureUuidFieldBuilder() {
|
||||
if (futureUuidBuilder_ == null) {
|
||||
futureUuidBuilder_ = new com.google.protobuf.SingleFieldBuilder<
|
||||
|
|
@ -672,7 +672,7 @@ public final class MailboxProtocol {
|
|||
}
|
||||
return futureUuidBuilder_;
|
||||
}
|
||||
|
||||
|
||||
// required bytes message = 4;
|
||||
private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY;
|
||||
public boolean hasMessage() {
|
||||
|
|
@ -696,25 +696,25 @@ public final class MailboxProtocol {
|
|||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:DurableMailboxMessageProtocol)
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
defaultInstance = new DurableMailboxMessageProtocol(true);
|
||||
defaultInstance.initFields();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:DurableMailboxMessageProtocol)
|
||||
}
|
||||
|
||||
|
||||
public interface UuidProtocolOrBuilder
|
||||
extends com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
|
||||
// required uint64 high = 1;
|
||||
boolean hasHigh();
|
||||
long getHigh();
|
||||
|
||||
|
||||
// required uint64 low = 2;
|
||||
boolean hasLow();
|
||||
long getLow();
|
||||
|
|
@ -727,26 +727,26 @@ public final class MailboxProtocol {
|
|||
super(builder);
|
||||
}
|
||||
private UuidProtocol(boolean noInit) {}
|
||||
|
||||
|
||||
private static final UuidProtocol defaultInstance;
|
||||
public static UuidProtocol getDefaultInstance() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
|
||||
public UuidProtocol getDefaultInstanceForType() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return akka.actor.mailbox.MailboxProtocol.internal_static_UuidProtocol_descriptor;
|
||||
}
|
||||
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return akka.actor.mailbox.MailboxProtocol.internal_static_UuidProtocol_fieldAccessorTable;
|
||||
}
|
||||
|
||||
|
||||
private int bitField0_;
|
||||
// required uint64 high = 1;
|
||||
public static final int HIGH_FIELD_NUMBER = 1;
|
||||
|
|
@ -757,7 +757,7 @@ public final class MailboxProtocol {
|
|||
public long getHigh() {
|
||||
return high_;
|
||||
}
|
||||
|
||||
|
||||
// required uint64 low = 2;
|
||||
public static final int LOW_FIELD_NUMBER = 2;
|
||||
private long low_;
|
||||
|
|
@ -767,7 +767,7 @@ public final class MailboxProtocol {
|
|||
public long getLow() {
|
||||
return low_;
|
||||
}
|
||||
|
||||
|
||||
private void initFields() {
|
||||
high_ = 0L;
|
||||
low_ = 0L;
|
||||
|
|
@ -776,7 +776,7 @@ public final class MailboxProtocol {
|
|||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized != -1) return isInitialized == 1;
|
||||
|
||||
|
||||
if (!hasHigh()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
|
|
@ -788,7 +788,7 @@ public final class MailboxProtocol {
|
|||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
|
|
@ -800,12 +800,12 @@ public final class MailboxProtocol {
|
|||
}
|
||||
getUnknownFields().writeTo(output);
|
||||
}
|
||||
|
||||
|
||||
private int memoizedSerializedSize = -1;
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
|
||||
size = 0;
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
|
|
@ -819,14 +819,14 @@ public final class MailboxProtocol {
|
|||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@java.lang.Override
|
||||
protected java.lang.Object writeReplace()
|
||||
throws java.io.ObjectStreamException {
|
||||
return super.writeReplace();
|
||||
}
|
||||
|
||||
|
||||
public static akka.actor.mailbox.MailboxProtocol.UuidProtocol parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
|
|
@ -893,14 +893,14 @@ public final class MailboxProtocol {
|
|||
return newBuilder().mergeFrom(input, extensionRegistry)
|
||||
.buildParsed();
|
||||
}
|
||||
|
||||
|
||||
public static Builder newBuilder() { return Builder.create(); }
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder(akka.actor.mailbox.MailboxProtocol.UuidProtocol prototype) {
|
||||
return newBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() { return newBuilder(this); }
|
||||
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
|
||||
|
|
@ -914,17 +914,17 @@ public final class MailboxProtocol {
|
|||
getDescriptor() {
|
||||
return akka.actor.mailbox.MailboxProtocol.internal_static_UuidProtocol_descriptor;
|
||||
}
|
||||
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return akka.actor.mailbox.MailboxProtocol.internal_static_UuidProtocol_fieldAccessorTable;
|
||||
}
|
||||
|
||||
|
||||
// Construct using akka.actor.mailbox.MailboxProtocol.UuidProtocol.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
|
||||
private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
|
|
@ -936,7 +936,7 @@ public final class MailboxProtocol {
|
|||
private static Builder create() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
high_ = 0L;
|
||||
|
|
@ -945,20 +945,20 @@ public final class MailboxProtocol {
|
|||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Builder clone() {
|
||||
return create().mergeFrom(buildPartial());
|
||||
}
|
||||
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return akka.actor.mailbox.MailboxProtocol.UuidProtocol.getDescriptor();
|
||||
}
|
||||
|
||||
|
||||
public akka.actor.mailbox.MailboxProtocol.UuidProtocol getDefaultInstanceForType() {
|
||||
return akka.actor.mailbox.MailboxProtocol.UuidProtocol.getDefaultInstance();
|
||||
}
|
||||
|
||||
|
||||
public akka.actor.mailbox.MailboxProtocol.UuidProtocol build() {
|
||||
akka.actor.mailbox.MailboxProtocol.UuidProtocol result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
|
|
@ -966,7 +966,7 @@ public final class MailboxProtocol {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private akka.actor.mailbox.MailboxProtocol.UuidProtocol buildParsed()
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
akka.actor.mailbox.MailboxProtocol.UuidProtocol result = buildPartial();
|
||||
|
|
@ -976,7 +976,7 @@ public final class MailboxProtocol {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public akka.actor.mailbox.MailboxProtocol.UuidProtocol buildPartial() {
|
||||
akka.actor.mailbox.MailboxProtocol.UuidProtocol result = new akka.actor.mailbox.MailboxProtocol.UuidProtocol(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
|
|
@ -993,7 +993,7 @@ public final class MailboxProtocol {
|
|||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof akka.actor.mailbox.MailboxProtocol.UuidProtocol) {
|
||||
return mergeFrom((akka.actor.mailbox.MailboxProtocol.UuidProtocol)other);
|
||||
|
|
@ -1002,7 +1002,7 @@ public final class MailboxProtocol {
|
|||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Builder mergeFrom(akka.actor.mailbox.MailboxProtocol.UuidProtocol other) {
|
||||
if (other == akka.actor.mailbox.MailboxProtocol.UuidProtocol.getDefaultInstance()) return this;
|
||||
if (other.hasHigh()) {
|
||||
|
|
@ -1014,19 +1014,19 @@ public final class MailboxProtocol {
|
|||
this.mergeUnknownFields(other.getUnknownFields());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public final boolean isInitialized() {
|
||||
if (!hasHigh()) {
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
if (!hasLow()) {
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
|
|
@ -1063,9 +1063,9 @@ public final class MailboxProtocol {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private int bitField0_;
|
||||
|
||||
|
||||
// required uint64 high = 1;
|
||||
private long high_ ;
|
||||
public boolean hasHigh() {
|
||||
|
|
@ -1086,7 +1086,7 @@ public final class MailboxProtocol {
|
|||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
// required uint64 low = 2;
|
||||
private long low_ ;
|
||||
public boolean hasLow() {
|
||||
|
|
@ -1107,18 +1107,18 @@ public final class MailboxProtocol {
|
|||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:UuidProtocol)
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
defaultInstance = new UuidProtocol(true);
|
||||
defaultInstance.initFields();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:UuidProtocol)
|
||||
}
|
||||
|
||||
|
||||
private static com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_DurableMailboxMessageProtocol_descriptor;
|
||||
private static
|
||||
|
|
@ -1129,7 +1129,7 @@ public final class MailboxProtocol {
|
|||
private static
|
||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internal_static_UuidProtocol_fieldAccessorTable;
|
||||
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
|
|
@ -1174,6 +1174,6 @@ public final class MailboxProtocol {
|
|||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
}, assigner);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -88,4 +88,4 @@ class FileBasedBarrier(
|
|||
def expire(barrier: String) = {
|
||||
throw new BarrierTimeoutException("Timeout (%s) waiting for %s barrier" format (timeout, barrier))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ public final class ProtobufProtocol {
|
|||
}
|
||||
public interface MyMessageOrBuilder
|
||||
extends com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
|
||||
// required uint64 id = 1;
|
||||
boolean hasId();
|
||||
long getId();
|
||||
|
||||
|
||||
// required string name = 2;
|
||||
boolean hasName();
|
||||
String getName();
|
||||
|
||||
|
||||
// required bool status = 3;
|
||||
boolean hasStatus();
|
||||
boolean getStatus();
|
||||
|
|
@ -31,26 +31,26 @@ public final class ProtobufProtocol {
|
|||
super(builder);
|
||||
}
|
||||
private MyMessage(boolean noInit) {}
|
||||
|
||||
|
||||
private static final MyMessage defaultInstance;
|
||||
public static MyMessage getDefaultInstance() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
|
||||
public MyMessage getDefaultInstanceForType() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return akka.actor.ProtobufProtocol.internal_static_akka_actor_MyMessage_descriptor;
|
||||
}
|
||||
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return akka.actor.ProtobufProtocol.internal_static_akka_actor_MyMessage_fieldAccessorTable;
|
||||
}
|
||||
|
||||
|
||||
private int bitField0_;
|
||||
// required uint64 id = 1;
|
||||
public static final int ID_FIELD_NUMBER = 1;
|
||||
|
|
@ -61,7 +61,7 @@ public final class ProtobufProtocol {
|
|||
public long getId() {
|
||||
return id_;
|
||||
}
|
||||
|
||||
|
||||
// required string name = 2;
|
||||
public static final int NAME_FIELD_NUMBER = 2;
|
||||
private java.lang.Object name_;
|
||||
|
|
@ -73,7 +73,7 @@ public final class ProtobufProtocol {
|
|||
if (ref instanceof String) {
|
||||
return (String) ref;
|
||||
} else {
|
||||
com.google.protobuf.ByteString bs =
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
String s = bs.toStringUtf8();
|
||||
if (com.google.protobuf.Internal.isValidUtf8(bs)) {
|
||||
|
|
@ -85,7 +85,7 @@ public final class ProtobufProtocol {
|
|||
private com.google.protobuf.ByteString getNameBytes() {
|
||||
java.lang.Object ref = name_;
|
||||
if (ref instanceof String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8((String) ref);
|
||||
name_ = b;
|
||||
return b;
|
||||
|
|
@ -93,7 +93,7 @@ public final class ProtobufProtocol {
|
|||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// required bool status = 3;
|
||||
public static final int STATUS_FIELD_NUMBER = 3;
|
||||
private boolean status_;
|
||||
|
|
@ -103,7 +103,7 @@ public final class ProtobufProtocol {
|
|||
public boolean getStatus() {
|
||||
return status_;
|
||||
}
|
||||
|
||||
|
||||
private void initFields() {
|
||||
id_ = 0L;
|
||||
name_ = "";
|
||||
|
|
@ -113,7 +113,7 @@ public final class ProtobufProtocol {
|
|||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized != -1) return isInitialized == 1;
|
||||
|
||||
|
||||
if (!hasId()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
|
|
@ -129,7 +129,7 @@ public final class ProtobufProtocol {
|
|||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
|
|
@ -144,12 +144,12 @@ public final class ProtobufProtocol {
|
|||
}
|
||||
getUnknownFields().writeTo(output);
|
||||
}
|
||||
|
||||
|
||||
private int memoizedSerializedSize = -1;
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
|
||||
size = 0;
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
|
|
@ -167,14 +167,14 @@ public final class ProtobufProtocol {
|
|||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@java.lang.Override
|
||||
protected java.lang.Object writeReplace()
|
||||
throws java.io.ObjectStreamException {
|
||||
return super.writeReplace();
|
||||
}
|
||||
|
||||
|
||||
public static akka.actor.ProtobufProtocol.MyMessage parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
|
|
@ -241,14 +241,14 @@ public final class ProtobufProtocol {
|
|||
return newBuilder().mergeFrom(input, extensionRegistry)
|
||||
.buildParsed();
|
||||
}
|
||||
|
||||
|
||||
public static Builder newBuilder() { return Builder.create(); }
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder(akka.actor.ProtobufProtocol.MyMessage prototype) {
|
||||
return newBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() { return newBuilder(this); }
|
||||
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
|
||||
|
|
@ -262,17 +262,17 @@ public final class ProtobufProtocol {
|
|||
getDescriptor() {
|
||||
return akka.actor.ProtobufProtocol.internal_static_akka_actor_MyMessage_descriptor;
|
||||
}
|
||||
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return akka.actor.ProtobufProtocol.internal_static_akka_actor_MyMessage_fieldAccessorTable;
|
||||
}
|
||||
|
||||
|
||||
// Construct using akka.actor.ProtobufProtocol.MyMessage.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
|
||||
private Builder(BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
|
|
@ -284,7 +284,7 @@ public final class ProtobufProtocol {
|
|||
private static Builder create() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
id_ = 0L;
|
||||
|
|
@ -295,20 +295,20 @@ public final class ProtobufProtocol {
|
|||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Builder clone() {
|
||||
return create().mergeFrom(buildPartial());
|
||||
}
|
||||
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return akka.actor.ProtobufProtocol.MyMessage.getDescriptor();
|
||||
}
|
||||
|
||||
|
||||
public akka.actor.ProtobufProtocol.MyMessage getDefaultInstanceForType() {
|
||||
return akka.actor.ProtobufProtocol.MyMessage.getDefaultInstance();
|
||||
}
|
||||
|
||||
|
||||
public akka.actor.ProtobufProtocol.MyMessage build() {
|
||||
akka.actor.ProtobufProtocol.MyMessage result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
|
|
@ -316,7 +316,7 @@ public final class ProtobufProtocol {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private akka.actor.ProtobufProtocol.MyMessage buildParsed()
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
akka.actor.ProtobufProtocol.MyMessage result = buildPartial();
|
||||
|
|
@ -326,7 +326,7 @@ public final class ProtobufProtocol {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public akka.actor.ProtobufProtocol.MyMessage buildPartial() {
|
||||
akka.actor.ProtobufProtocol.MyMessage result = new akka.actor.ProtobufProtocol.MyMessage(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
|
|
@ -347,7 +347,7 @@ public final class ProtobufProtocol {
|
|||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof akka.actor.ProtobufProtocol.MyMessage) {
|
||||
return mergeFrom((akka.actor.ProtobufProtocol.MyMessage)other);
|
||||
|
|
@ -356,7 +356,7 @@ public final class ProtobufProtocol {
|
|||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Builder mergeFrom(akka.actor.ProtobufProtocol.MyMessage other) {
|
||||
if (other == akka.actor.ProtobufProtocol.MyMessage.getDefaultInstance()) return this;
|
||||
if (other.hasId()) {
|
||||
|
|
@ -371,23 +371,23 @@ public final class ProtobufProtocol {
|
|||
this.mergeUnknownFields(other.getUnknownFields());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public final boolean isInitialized() {
|
||||
if (!hasId()) {
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
if (!hasName()) {
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
if (!hasStatus()) {
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
|
|
@ -429,9 +429,9 @@ public final class ProtobufProtocol {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private int bitField0_;
|
||||
|
||||
|
||||
// required uint64 id = 1;
|
||||
private long id_ ;
|
||||
public boolean hasId() {
|
||||
|
|
@ -452,7 +452,7 @@ public final class ProtobufProtocol {
|
|||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
// required string name = 2;
|
||||
private java.lang.Object name_ = "";
|
||||
public boolean hasName() {
|
||||
|
|
@ -488,7 +488,7 @@ public final class ProtobufProtocol {
|
|||
name_ = value;
|
||||
onChanged();
|
||||
}
|
||||
|
||||
|
||||
// required bool status = 3;
|
||||
private boolean status_ ;
|
||||
public boolean hasStatus() {
|
||||
|
|
@ -509,24 +509,24 @@ public final class ProtobufProtocol {
|
|||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:akka.actor.MyMessage)
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
defaultInstance = new MyMessage(true);
|
||||
defaultInstance.initFields();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:akka.actor.MyMessage)
|
||||
}
|
||||
|
||||
|
||||
private static com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_akka_actor_MyMessage_descriptor;
|
||||
private static
|
||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internal_static_akka_actor_MyMessage_fieldAccessorTable;
|
||||
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
|
|
@ -560,6 +560,6 @@ public final class ProtobufProtocol {
|
|||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
}, assigner);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,4 +91,4 @@ class AccrualFailureDetectorSpec extends WordSpec with MustMatchers {
|
|||
fd.isAvailable(conn) must be(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,4 +12,4 @@ class GossiperSpec extends WordSpec with MustMatchers {
|
|||
"..." in {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,4 +123,4 @@ class VectorClockSpec extends WordSpec with MustMatchers {
|
|||
clock5_1.compare(clock3_2) must be(After)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ akka {
|
|||
enabled-modules = ["camel", "http"]
|
||||
|
||||
time-unit = "seconds"
|
||||
|
||||
|
||||
event-handlers = ["akka.event.EventHandler$DefaultListener"]
|
||||
|
||||
boot = ["sample.camel.Boot"]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ akka {
|
|||
enabled-modules = ["http"]
|
||||
|
||||
time-unit = "seconds"
|
||||
|
||||
|
||||
event-handlers = ["akka.event.EventHandler$DefaultListener"]
|
||||
|
||||
boot = ["sample.hello.Boot"]
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class RemoteTypedSessionActorImpl extends TypedActor implements RemoteTyp
|
|||
instantiatedSessionActors.remove(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private String user="anonymous";
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -53,4 +53,4 @@ public class StatefulPojo extends TypedActor {
|
|||
return isInitialized;
|
||||
}
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ akka {
|
|||
enabled-modules = ["remote"] # Comma separated list of the enabled modules. Options: ["remote", "camel", "http"]
|
||||
|
||||
time-unit = "seconds" # Time unit for all timeout properties throughout the config
|
||||
|
||||
|
||||
event-handlers = ["akka.event.EventHandler$DefaultListener"] # event handlers to register at boot time (EventHandler$DefaultListener logs to STDOUT)
|
||||
|
||||
# These boot classes are loaded (and created) automatically when the Akka Microkernel boots up
|
||||
|
|
|
|||
|
|
@ -20,4 +20,4 @@ public class Increment {
|
|||
public CountDownLatch getLatch() {
|
||||
return latch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,4 +39,4 @@ abstract class AkkaSpec(_application: AkkaApplication = AkkaApplication())
|
|||
def spawn(body: ⇒ Unit)(implicit dispatcher: MessageDispatcher) {
|
||||
actorOf(Props(ctx ⇒ { case "go" ⇒ try body finally ctx.self.stop() }).withDispatcher(dispatcher)) ! "go"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue