-
-
Save attribyte/67af37ec4b09a12d887f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Yesterday */ | |
case object DurablyFlushUpdates extends EmptyMessage | |
object DurablyFlushUpdatesMaterializer | |
extends EmptyMessageMaterializer { | |
def createMessage = DurablyFlushUpdates | |
} | |
/* Today */ | |
case class DurablyFlushUpdates(replicaCount: Int = 2) | |
extends NameValueMessage { | |
def toNameValuePairs = List( | |
("replicaCount", replicaCount) | |
) | |
} | |
object DurablyFlushUpdatesMaterializer | |
extends SingleValueMaterializer[Int]("replicaCount") { | |
def createMessage(value: Option[Int]) = { | |
DurablyFlushUpdates(value.getOrElse(2)) | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment