This file contains hidden or 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
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import org.vertx.java.core.Handler; | |
import org.vertx.java.core.http.HttpServer; | |
import org.vertx.java.core.http.HttpServerRequest; | |
import org.vertx.java.core.http.RouteMatcher; | |
import org.vertx.java.deploy.Verticle; | |
public class HttpRestVerticle1 extends Verticle { |
This file contains hidden or 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
case class RetryException(throwables: List[Throwable]) extends Exception(throwables.toString()) | |
object RetryUtil { | |
import scala.util.control.Exception.allCatch | |
def retry[T](retryLimit: Int)(f: => T): T = | |
retry(retryLimit, 0, classOf[Throwable])(f) | |
def retry[T](retryLimit: Int, retryInterval: Int)(f: => T): T = |