Sha256: 2b552a924e3ae97ccaa4aa505e597a7c815d98ff92c5200a00de2917808bb127
Contents?: true
Size: 1010 Bytes
Versions: 1
Compression:
Stored size: 1010 Bytes
Contents
package com.twitter.birdname import com.twitter.util._ import java.util.concurrent.Executors import config._ class BirdNameServiceImpl(config: BirdNameServiceConfig) extends BirdNameServiceServer { val serverName = "BirdName" val thriftPort = config.thriftPort /** * These services are based on finagle, which implements a nonblocking server. If you * are making blocking rpc calls, it's really important that you run these actions in * a thread pool, so that you don't block the main event loop. This thread pool is only * needed for these blocking actions. The code looks like: * * // Depends on com.twitter.util >= 1.6.10 * val futurePool = new FuturePool(Executors.newFixedThreadPool(config.threadPoolSize)) * * def hello() = futurePool { * someService.blockingRpcCall * } * */ // TODO: Please implement your api. You should have already created your thrift definition. def hello() = { Future("world") } }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
scala-bootstrapper-0.7.0 | lib/template/src/main/scala/com/twitter/birdname/BirdNameServiceImpl.scala.erb |