Permalink
Browse files

Remove trailing whitespace

  • Loading branch information...
1 parent aadf993 commit 4f9baf059833927cddc929fee3e47fe750b5bc9c @jtescher jtescher committed Nov 19, 2016
Showing with 308 additions and 308 deletions.
  1. +4 −4 colossus-examples/src/main/scala/colossus-examples/ChatExample.scala
  2. +1 −1 colossus-examples/src/main/scala/colossus-examples/EchoExample.scala
  3. +1 −1 colossus-examples/src/main/scala/colossus-examples/HttpExample.scala
  4. +2 −2 colossus-examples/src/main/scala/colossus-examples/KeyValExample.scala
  5. +3 −3 colossus-examples/src/main/scala/colossus-examples/WebsocketExample.scala
  6. +1 −1 colossus-metrics/src/main/scala/colossus/metrics/Metric.scala
  7. +2 −2 colossus-metrics/src/main/scala/colossus/metrics/MetricClock.scala
  8. +2 −2 colossus-metrics/src/main/scala/colossus/metrics/MetricSystem.scala
  9. +1 −1 colossus-metrics/src/main/scala/colossus/metrics/collectors/Histogram.scala
  10. +1 −1 colossus-metrics/src/main/scala/colossus/metrics/collectors/Rate.scala
  11. +1 −1 colossus-metrics/src/test/scala/colossus/metrics/CollectionMapSpec.scala
  12. +1 −1 colossus-metrics/src/test/scala/colossus/metrics/CounterSpec.scala
  13. +1 −1 colossus-metrics/src/test/scala/colossus/metrics/MetricSpec.scala
  14. +1 −1 colossus-metrics/src/test/scala/colossus/metrics/RateSpec.scala
  15. +1 −1 colossus-testkit/src/main/scala/colossus-testkit/HttpServiceSpec.scala
  16. +3 −3 colossus-testkit/src/main/scala/colossus-testkit/MockConnection.scala
  17. +2 −2 colossus-testkit/src/main/scala/colossus-testkit/MockWriteBuffer.scala
  18. +1 −1 colossus-testkit/src/main/scala/colossus-testkit/PipeFoldTester.scala
  19. +2 −2 colossus-testkit/src/main/scala/colossus-testkit/ServiceSpec.scala
  20. +1 −1 colossus-testkit/src/test/scala/colossus/FakeIOSystemSpec.scala
  21. +1 −1 colossus-testkit/src/test/scala/colossus/MockWriteBufferSpec.scala
  22. +2 −2 colossus-testkit/src/test/scala/colossus/ServiceSpecSpec.scala
  23. +1 −1 colossus-tests/src/it/scala/colossus/MemcacheITSpec.scala
  24. +4 −4 colossus-tests/src/it/scala/colossus/RedisITSpec.scala
  25. +4 −4 colossus-tests/src/test/scala/colossus/Util.scala
  26. +1 −1 colossus-tests/src/test/scala/colossus/controller/Common.scala
  27. +7 −7 colossus-tests/src/test/scala/colossus/controller/InputControllerSpec.scala
  28. +2 −2 colossus-tests/src/test/scala/colossus/controller/OutputControllerSpec.scala
  29. +1 −1 colossus-tests/src/test/scala/colossus/core/ConnectionHandlerSpec.scala
  30. +4 −4 colossus-tests/src/test/scala/colossus/core/CoreHandlerSpec.scala
  31. +2 −2 colossus-tests/src/test/scala/colossus/core/DataBlockSpec.scala
  32. +2 −2 colossus-tests/src/test/scala/colossus/core/DataOutBufferSpec.scala
  33. +1 −1 colossus-tests/src/test/scala/colossus/core/ServerConfigLoadingSpec.scala
  34. +6 −6 colossus-tests/src/test/scala/colossus/core/TaskTest.scala
  35. +3 −3 colossus-tests/src/test/scala/colossus/protocols/http/HttpHeadSpec.scala
  36. +19 −19 colossus-tests/src/test/scala/colossus/protocols/http/HttpParseSpec.scala
  37. +1 −1 colossus-tests/src/test/scala/colossus/protocols/http/HttpPipeSpec.scala
  38. +1 −1 colossus-tests/src/test/scala/colossus/protocols/http/HttpResponseSpec.scala
  39. +2 −2 colossus-tests/src/test/scala/colossus/protocols/http/client/HttpResponseParserSpec.scala
  40. +1 −1 colossus-tests/src/test/scala/colossus/protocols/http/client/StreamingHttpResponseParserSpec.scala
  41. +1 −1 colossus-tests/src/test/scala/colossus/protocols/memcache/MemcacheCommandSpec.scala
  42. +1 −1 colossus-tests/src/test/scala/colossus/protocols/memcache/MemcacheParserSpec.scala
  43. +1 −1 colossus-tests/src/test/scala/colossus/protocols/redis/RedisParserSpec.scala
  44. +4 −4 colossus-tests/src/test/scala/colossus/protocols/redis/ScatterGatherSpec.scala
  45. +7 −7 colossus-tests/src/test/scala/colossus/protocols/websocket/WebsocketSpec.scala
  46. +9 −9 colossus-tests/src/test/scala/colossus/service/LoadBalancingClientSpec.scala
  47. +1 −1 colossus-tests/src/test/scala/colossus/service/RetryPolicySpec.scala
  48. +4 −4 colossus-tests/src/test/scala/colossus/service/ServiceClientSpec.scala
  49. +2 −2 colossus-tests/src/test/scala/colossus/service/ServiceServerSpec.scala
  50. +2 −2 colossus-tests/src/test/scala/colossus/util/CombinatorSpec.scala
  51. +4 −4 colossus/src/main/scala/colossus/controller/Controller.scala
  52. +7 −7 colossus/src/main/scala/colossus/controller/InputController.scala
  53. +5 −5 colossus/src/main/scala/colossus/controller/OutputController.scala
  54. +10 −10 colossus/src/main/scala/colossus/controller/Pipe.scala
  55. +6 −6 colossus/src/main/scala/colossus/core/Connection.scala
  56. +1 −1 colossus/src/main/scala/colossus/core/ConnectionHandler.scala
  57. +1 −1 colossus/src/main/scala/colossus/core/ConnectionLimiter.scala
  58. +1 −1 colossus/src/main/scala/colossus/core/ConnectionSnapshot.scala
  59. +1 −1 colossus/src/main/scala/colossus/core/CoreHandler.scala
  60. +1 −1 colossus/src/main/scala/colossus/core/DataBlock.scala
  61. +1 −1 colossus/src/main/scala/colossus/core/DataOutBuffer.scala
  62. +1 −1 colossus/src/main/scala/colossus/core/Delegator.scala
  63. +6 −6 colossus/src/main/scala/colossus/core/RetryPolicy.scala
  64. +2 −2 colossus/src/main/scala/colossus/core/Server.scala
  65. +2 −2 colossus/src/main/scala/colossus/core/Worker.scala
  66. +6 −6 colossus/src/main/scala/colossus/core/WorkerItem.scala
  67. +1 −1 colossus/src/main/scala/colossus/core/WorkerManager.scala
  68. +2 −2 colossus/src/main/scala/colossus/core/WriteBuffer.scala
  69. +6 −6 colossus/src/main/scala/colossus/protocols/http/Header.scala
  70. +2 −2 colossus/src/main/scala/colossus/protocols/http/HttpBody.scala
  71. +2 −2 colossus/src/main/scala/colossus/protocols/http/HttpClient.scala
  72. +2 −2 colossus/src/main/scala/colossus/protocols/http/HttpParse.scala
  73. +3 −3 colossus/src/main/scala/colossus/protocols/http/HttpRequest.scala
  74. +3 −3 colossus/src/main/scala/colossus/protocols/http/HttpRequestParser.scala
  75. +5 −5 colossus/src/main/scala/colossus/protocols/http/HttpResponse.scala
  76. +11 −11 colossus/src/main/scala/colossus/protocols/http/HttpResponseParser.scala
  77. +6 −6 colossus/src/main/scala/colossus/protocols/http/package.scala
  78. +2 −2 colossus/src/main/scala/colossus/protocols/memcache/MemcacheOps.scala
  79. +1 −1 colossus/src/main/scala/colossus/protocols/redis/Command.scala
  80. +2 −2 colossus/src/main/scala/colossus/protocols/redis/RedisOps.scala
  81. +2 −2 colossus/src/main/scala/colossus/protocols/redis/RedisReplyParser.scala
  82. +2 −2 colossus/src/main/scala/colossus/protocols/redis/ScatterGather.scala
  83. +3 −3 colossus/src/main/scala/colossus/protocols/telnet/Telnet.scala
  84. +2 −2 colossus/src/main/scala/colossus/protocols/websocket/SubProtocol.scala
  85. +12 −12 colossus/src/main/scala/colossus/protocols/websocket/Websocket.scala
  86. +2 −2 colossus/src/main/scala/colossus/protocols/websocket/package.scala
  87. +3 −3 colossus/src/main/scala/colossus/service/Async.scala
  88. +1 −1 colossus/src/main/scala/colossus/service/AsyncServiceClient.scala
  89. +1 −1 colossus/src/main/scala/colossus/service/Callback.scala
  90. +1 −1 colossus/src/main/scala/colossus/service/Codec.scala
  91. +9 −9 colossus/src/main/scala/colossus/service/LoadBalancingClient.scala
  92. +2 −2 colossus/src/main/scala/colossus/service/ServiceClient.scala
  93. +1 −1 colossus/src/main/scala/colossus/service/ServiceClientPool.scala
  94. +5 −5 colossus/src/main/scala/colossus/service/ServiceServer.scala
  95. +1 −1 colossus/src/main/scala/colossus/service/TagDecorator.scala
  96. +19 −19 colossus/src/main/scala/colossus/util/Parsing.scala
  97. +1 −1 colossus/src/main/scala/colossus/util/Task.scala
  98. +8 −8 project/Build.scala
  99. +1 −1 project/Publish.scala
@@ -15,7 +15,7 @@ import scala.concurrent.duration._
* encode output messages. There is no coupling between input and output
* messages. The service layer extends this layer to add request/response
* semantics.
- *
+ *
* This example is a simple chat server built on the controller layer. This example is largely
* a motivator for cleaning up the controller API. It should become simpler as
* we improve the interface.
@@ -43,7 +43,7 @@ class ChatCodec extends Codec[ChatMessage, String]{
def reset(){}
}
-
+
class Broadcaster extends Actor {
import Broadcaster._
@@ -78,7 +78,7 @@ extends Controller[String, ChatMessage](new ChatCodec, ControllerConfig(50, 10.s
with ProxyActor with ServerConnectionHandler {
implicit val namespace = context.server.namespace
-
+
sealed trait State
object State {
case object LoggingIn extends State
@@ -136,7 +136,7 @@ object ChatExample {
val broadcaster = io.actorSystem.actorOf(Props[Broadcaster])
Server.basic("chat", port)(context => new ChatHandler(broadcaster, context))
-
+
}
}
@@ -28,7 +28,7 @@ object EchoExample {
def start(port: Int)(implicit io: IOSystem): ServerRef = {
Server.basic("echo", port)(new EchoHandler(_))
-
+
}
}
@@ -18,7 +18,7 @@ import scala.concurrent.duration._
object HttpExample {
class HttpExampleService(redis: RedisClient[Callback], context: ServerContext) extends HttpService(ServiceConfig.Default, context){
-
+
def invalidReply(reply: Reply) = s"Invalid reply from redis $reply"
def handle = {
@@ -31,7 +31,7 @@ object KeyValDB {
}
object KeyValExample {
-
+
def start(port: Int)(implicit io: IOSystem): ServerRef = {
import io.actorSystem.dispatcher
@@ -59,4 +59,4 @@ object KeyValExample {
}}
}
}
-
+
@@ -38,17 +38,17 @@ class PrimeGenerator extends Actor {
}
case object Next
-
+
object WebsocketExample {
def start(port: Int)(implicit io: IOSystem) = {
-
+
val generator = io.actorSystem.actorOf(Props[PrimeGenerator])
WebsocketServer.start("websocket", port){worker => new WebsocketInitializer(worker) {
-
+
def onConnect = ctx => new WebsocketServerHandler[RawString](ctx) with ProxyActor {
private var sending = false
@@ -22,7 +22,7 @@ case class MetricAddress(components: List[String]) {
def pieceString = components.mkString("/")
def idString = components.mkString("_")
-
+
/**
* String version the address used for loading configuration
*/
@@ -101,8 +101,8 @@ class SystemMetricsCollector(namespace: MetricNamespace) {
(namespace.namespace / "system" / "gc" / "msec") -> msec
)
}
-
- val fdInfo: MetricMap = ManagementFactory.getOperatingSystemMXBean match {
+
+ val fdInfo: MetricMap = ManagementFactory.getOperatingSystemMXBean match {
case u: com.sun.management.UnixOperatingSystemMXBean => Map(
(namespace.namespace / "system" / "fd_count") -> Map(Map() -> u.getOpenFileDescriptorCount)
)
@@ -93,7 +93,7 @@ case class MetricContext(namespace: MetricAddress, collection: Collection, tags:
case class SystemMetricsConfig(enabled: Boolean, namespace: MetricAddress)
-/**
+/**
* Configuration object for a [[MetricSystem]]
*
* @param enabled true to enable all functionality. Setting to false will effectively create a dummy system that does nothing
@@ -119,7 +119,7 @@ object MetricSystemConfig {
* config object, the format should be that of the `colossus.metrics` section
* in the reference.conf. For example, if creating a metric system named
* "foo" that will create a rate named "bar", the config should look like:
- *
+ *
* ```
foo {
system.enabled = true
@@ -309,7 +309,7 @@ class DefaultHistogram private[metrics](
private def withHist[T](collectionInterval: FiniteDuration, tags: TagMap)(op: BaseHistogram => T): Option[T] = {
Option(tagHists(collectionInterval).get(tags)).map(op)
}
-
+
def percentile(collectionInterval: FiniteDuration, percent: Double, tags: TagMap = TagMap.Empty): Int = {
withHist(collectionInterval, tags)(_.percentile(percent)).getOrElse(0)
@@ -29,7 +29,7 @@ trait Rate extends Collector{
*
* @param collectionInterval The collection interval to retrieve the value for. Collection intervals are configured per [[MetricSystem]]
* @param tags The tags for the value to get, defaults to an empty tagmap
- *
+ *
*/
def value(collectionInterval: FiniteDuration, tags: TagMap = TagMap.Empty): Long
@@ -5,7 +5,7 @@ import org.scalatest._
class CollectionMapSpec extends WordSpec with MustMatchers with BeforeAndAfterAll{
"CollectionMap" must {
-
+
"increment a non-existing value" in {
val c = new CollectionMap[String]
c.get("foo") must equal(None)
@@ -49,7 +49,7 @@ class CounterSpec extends MetricIntegrationSpec {
}
-
+
}
}
@@ -26,7 +26,7 @@ class MetricSpec(_system : ActorSystem) extends MetricIntegrationSpec(_system) w
"MetricSystem" must {
"allow multiple systems to start without any conflicts" in {
val config = MetricSystemConfig.load("foo")
-
+
val m1 = MetricSystem(config)
val m2 = MetricSystem(config.copy(name = "different-name"))
//no exceptions means the test passed
@@ -95,7 +95,7 @@ class RateSpec extends MetricIntegrationSpec {
implicit val ns = MetricContext("/foo", Collection.withReferenceConf(Seq(1.second))) / "bar"
val r = Rate("/baz")
r.address must equal(MetricAddress("/foo/bar/baz"))
-
+
}
}
}
@@ -33,7 +33,7 @@ abstract class HttpServiceSpec extends ServiceSpec[Http] {
assert(response.head.code == expectedCode, msg)
}
-
+
def assertBody(request : HttpRequest, response : HttpResponse, expectedBody : String){
val body = response.body.bytes.utf8String
assert(body == expectedBody, s"$body did not equal $expectedBody")
@@ -8,7 +8,7 @@ import akka.testkit.TestProbe
import scala.concurrent.duration._
trait MockConnection extends Connection with MockChannelActions {
-
+
/**
* Simulate event-loop iterations, calling readyForData until this buffer
* fills or everything is written. This can be used to test backpressure
@@ -42,7 +42,7 @@ trait MockConnection extends Connection with MockChannelActions {
clearBuffer()
}
}
-
+
def iterate(bsize: Int = 100) = iterate[Unit](bsize)({})
@@ -58,7 +58,7 @@ trait MockConnection extends Connection with MockChannelActions {
/**
* checks to see if the connection handler has attempted to close the
- * connection.
+ * connection.
*/
def expectDisconnectAttempt() {
workerProbe.expectMsg(100.milliseconds, WorkerCommand.Disconnect(id))
@@ -99,9 +99,9 @@ trait MockChannelActions extends ChannelActions {
val call = writeCalls.dequeue()
f(call)
}
-
-
+
+
}
class MockWriteBuffer(val maxWriteSize: Int) extends WriteBuffer with MockChannelActions {
@@ -22,7 +22,7 @@ class PipeFoldTester[T](foldCB: Callback[T]) {
private var res: Option[Try[T]] = None
foldCB.execute{result => res = Some(result)}
- private def expectRes(r: Try[T] => Unit) {
+ private def expectRes(r: Try[T] => Unit) {
res.map(r).getOrElse{
throw new Exception("Callback did not complete")
}
@@ -12,13 +12,13 @@ import service._
import scala.reflect.ClassTag
abstract class ServiceSpec[C <: Protocol](implicit provider: ServiceCodecProvider[C], clientProvider: ClientCodecProvider[C]) extends ColossusSpec {
-
+
type Request = C#Input
type Response = C#Output
implicit val sys = IOSystem("test-system", Some(2), MetricSystem.deadSystem)
-
+
def service: ServerRef
def requestTimeout: FiniteDuration
@@ -32,6 +32,6 @@ class FakeIOSystemSpec extends ColossusSpec with CallbackMatchers {
-
+
}
@@ -43,7 +43,7 @@ class MockWriteBufferSpec extends WordSpec with MustMatchers{
m.expectOneWrite(ByteString("cd"))
}
-
+
}
}
@@ -37,7 +37,7 @@ class ServiceSpecSpec extends ServiceSpec[Redis] {
expectResponseType[ErrorReply](Command("ASDF"))
}
-
+
}
}
@@ -52,6 +52,6 @@ class ServiceSpecTimeoutSpec extends ServiceSpec[Redis] {
intercept[TestFailedException]{
expectResponse(Command("DELAY"), StatusReply("OK"))
}
- }
+ }
}
}
@@ -44,7 +44,7 @@ class MemcacheITSpec extends ColossusSpec with ScalaFutures{
f.futureValue must be (mutable.HashSet(true, false)) //some keys are deleted by the tests.
super.afterAll()
}
-
+
val mValue = ByteString("value")
"Memcached client" should {
"add" in {
@@ -10,7 +10,7 @@ class RedisITSpec extends BaseRedisITSpec{
val keyPrefix = "colossusKeyIT"
"Redis key and string commands" should {
-
+
val value = ByteString("value")
"append" in {
@@ -204,7 +204,7 @@ class RedisITSpec extends BaseRedisITSpec{
}
res.futureValue.toSet must be (Set(key1, key2))
}
-
+
"mget" in {
val key1 = getKey()
val key2 = getKey()
@@ -218,7 +218,7 @@ class RedisITSpec extends BaseRedisITSpec{
}
res.futureValue must be (Seq(Some(value), Some(value), None))
}
-
+
"mset" in {
val key1 = getKey()
val key2 = getKey()
@@ -231,7 +231,7 @@ class RedisITSpec extends BaseRedisITSpec{
res.futureValue must be ((true, Seq(Some(value), Some(value))))
}
-
+
"msetnx" in {
val key1 = getKey()
val key2 = getKey()
@@ -24,7 +24,7 @@ class EchoHandler(c: ServerContext) extends BasicSyncHandler(c.context) with Ser
out.write(buffer.dequeue)
if (buffer.isEmpty) MoreDataResult.Complete else MoreDataResult.Incomplete
}
-
+
}
@@ -43,20 +43,20 @@ object RawProtocol {
}
implicit object RawClientLifter extends ClientLifter[Raw, RawClient] {
-
+
def lift[M[_]](client: Sender[Raw,M])(implicit async: Async[M]) = new BasicLiftedClient(client) with RawClient[M]
}
object Raw extends ClientFactories[Raw, RawClient]{
-
+
}
trait RawClient[M[_]] extends LiftedClient[Raw, M]
object RawClient {
}
-
+
implicit object RawCodecProvider extends ServiceCodecProvider[Raw] {
def provideCodec() = RawCodec
@@ -15,7 +15,7 @@ case class TestInputImpl(data: FiniteBytePipe) extends TestInput{
def source = data
def sink = data
}
-
+
case class TestOutput(data: Source[DataBuffer])
Oops, something went wrong.

0 comments on commit 4f9baf0

Please sign in to comment.