All Downloads are FREE. Search and download functionalities are using the official Maven repository.

akka.Done.scala Maven / Gradle / Ivy

There is a newer version: 2.2.6.3
Show newest version
/*
 * Copyright (C) 2016-2019 Lightbend Inc. 
 */

package akka

import java.io.Serializable
import akka.annotation.DoNotInherit

/**
 * Typically used together with `Future` to signal completion
 * but there is no actual value completed. More clearly signals intent
 * than `Unit` and is available both from Scala and Java (which `Unit` is not).
 */
@DoNotInherit sealed abstract class Done extends Serializable

case object Done extends Done {

  /**
   * Java API: the singleton instance
   */
  def getInstance(): Done = this

  /**
   * Java API: the singleton instance
   *
   * This is equivalent to [[Done.getInstance]], but can be used with static import.
   */
  def done(): Done = this
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy