Packages

p

tasks

util

package util

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. util
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class CallbackReaper extends Reaper
  2. class HeartBeatActor extends Actor with ActorLogging
  3. case class Latch(c: CountDownLatch) extends Product with Serializable
  4. abstract class Reaper extends Actor with ActorLogging
  5. class ShutdownActorSystemReaper extends Reaper
  6. class TransferIn extends Actor with ActorLogging
  7. class TransferOut extends Actor with ActorLogging
  8. case class Uri(uri: String) extends Product with Serializable
  9. case class WatchMe(ref: ActorRef, answer: Boolean = false) extends Product with Serializable

Value Members

  1. def addMaps[K, V](a: Map[K, V], b: Map[K, V])(fun: (V, V) ⇒ V): Map[K, V]

    Merge maps with key collision

    Merge maps with key collision

    fun

    Handles key collision

  2. def addMaps[K, V](a: Map[K, V], b: Map[K, V])(fun: (V, V) ⇒ V): Map[K, V]

    Merge maps with key collision

    Merge maps with key collision

    fun

    Handles key collision

  3. def base64(s: String): Array[Byte]
  4. def base64(b: Array[Byte]): String
  5. def chooseNetworkPort(implicit config: TasksConfig): Int
  6. def exec(pb: ProcessBuilder, atMost: Duration = Duration.Inf)(stdOutFunc: (String) ⇒ Unit = x: String =>)(implicit stdErrFunc: (String) ⇒ Unit = (x: String) => ()): Int

    Execute command with user function to process each line of output.

    Execute command with user function to process each line of output.

    Based on from http://www.jroller.com/thebugslayer/entry/executing_external_system_commands_in Creates 3 new threads: one for the stdout, one for the stderror, and one waits for the exit code.

    pb

    Description of the executable process

    atMost

    Maximum time to wait for the process to complete. Default infinite.

    returns

    Exit code of the process.

  7. def execGetStreamsAndCode(pb: ProcessBuilder, unsuccessfulOnErrorStream: Boolean = true, atMost: Duration = Duration.Inf): (List[String], List[String], Boolean)

    Execute command.

    Execute command. Returns stdout and stderr as strings, and true if it was successful.

    A process is considered successful if its exit code is 0 and the error stream is empty. The latter criterion can be disabled with the unsuccessfulOnErrorStream parameter.

    pb

    The process description.

    unsuccessfulOnErrorStream

    if true, then the process is considered as a failure if its stderr is not empty.

    atMost

    max waiting time.

    returns

    (stdout,stderr,success) triples

  8. def openFileInputStream[T](fileName: File)(func: (BufferedInputStream) ⇒ T): T

    Opens a buffered java.io.BufferedInputStream on the file.

    Opens a buffered java.io.BufferedInputStream on the file. Closes it after the block is executed.

  9. def openFileOutputStream[T](fileName: File, append: Boolean = false)(func: (BufferedOutputStream) ⇒ T): T

    Opens a buffered java.io.BufferedOutputStream on the file.

    Opens a buffered java.io.BufferedOutputStream on the file. Closes it after the block is executed.

  10. def readBinaryFile(f: File): Array[Byte]

    Reads file contents into a bytearray.

  11. def readBinaryFile(fileName: String): Array[Byte]

    Reads file contents into a bytearray.

  12. def readBinaryStream(f: InputStream): Array[Byte]

    Reads file contents into a bytearray.

  13. def readStreamAndClose(is: InputStream): Iterator[Byte] { ... /* 2 definitions in type refinement */ }

    Returns an iterator on the InputStream's data.

    Returns an iterator on the InputStream's data.

    Closes the stream when read through.

  14. def reflectivelyInstantiateObject[A](fqcn: String): A
  15. def rethrow[T](messageOnError: ⇒ String)(block: ⇒ T): T
  16. def rethrow[T](messageOnError: ⇒ String, exceptionFactory: (⇒ String, Throwable) ⇒ Throwable)(block: ⇒ T): T
  17. def retry[T](n: Int)(fn: ⇒ T): Try[T]

    Retry the given block n times.

    Retry the given block n times.

    Annotations
    @tailrec()
  18. def retryFuture[A](tag: String)(f: ⇒ Future[A], c: Int)(implicit as: ActorSystem, ec: ExecutionContext, log: LoggingAdapter): Future[A]
  19. def stackTraceAsString(t: Any): String
  20. def useResource[A <: AnyRef { def close(): Unit }, B](param: A)(f: (A) ⇒ B): B

    Returns the result of the block, and closes the resource.

    Returns the result of the block, and closes the resource.

    param

    closeable resource

    f

    block using the resource

  21. def writeBinaryToFile(data: Array[Byte]): File
  22. def writeBinaryToFile(file: File, data: Array[Byte]): Unit

    Writes binary data to file.

  23. def writeBinaryToFile(fileName: String, data: Array[Byte]): Unit

    Writes binary data to file.

  24. def writeToFile(file: File, data: String): Unit

    Writes text data to file.

  25. def writeToFile(fileName: String, data: String): Unit

    Writes text data to file.

  26. object AkkaStreamComponents
  27. object HeartBeatActor
  28. object TempFile
  29. object Uri extends Serializable
  30. object eq

    Type safe equality http://hseeberger.github.io/blog/2013/05/31/implicits-unchained-type-safe-equality-part2/

Inherited from AnyRef

Inherited from Any

Ungrouped