Sha256: a978e75998e3e2b9fa3201bdad8736afeab1e63c1305cd1513591bcc105662a0

Contents?: true

Size: 988 Bytes

Versions: 5

Compression:

Stored size: 988 Bytes

Contents

package com.twitter.birdname

import com.twitter.util._
import java.util.concurrent.Executors

class BirdNameServiceImpl(config: BirdNameServiceConfig) extends BirdNameService {
  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

5 entries across 5 versions & 1 rubygems

Version Path
scala-bootstrapper-0.4.0 lib/template/src/main/scala/com/twitter/birdname/BirdNameServiceImpl.scala.erb
scala-bootstrapper-0.3.0 lib/template/src/main/scala/com/twitter/birdname/BirdNameServiceImpl.scala.erb
scala-bootstrapper-0.2.1 lib/template/src/main/scala/com/twitter/birdname/BirdNameServiceImpl.scala.erb
scala-bootstrapper-0.2.0 lib/template/src/main/scala/com/twitter/birdname/BirdNameServiceImpl.scala.erb
scala-bootstrapper-0.1.3 lib/template/src/main/scala/com/twitter/birdname/BirdNameServiceImpl.scala.erb