Packages

o

com.twitter.util.tunable.linter

ConfigurationLinter

object ConfigurationLinter extends App

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConfigurationLinter
  2. App
  3. Lifecycle
  4. CloseOnceAwaitably
  5. CloseOnceAwaitably0
  6. Awaitable
  7. ClosableOnce
  8. CloseOnce
  9. Closable
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final val MinGrace: Duration

    Minimum duration to allow for exits to be processed.

    Minimum duration to allow for exits to be processed.

    Definition Classes
    App
  5. def allowUndefinedFlags: Boolean

    Whether or not to accept undefined flags

    Whether or not to accept undefined flags

    Attributes
    protected
    Definition Classes
    App
  6. def args: Array[String]

    The remaining, unparsed arguments

    The remaining, unparsed arguments

    Definition Classes
    App
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. final def close(deadline: Time): Future[Unit]

    Close the resource with the given deadline.

    Close the resource with the given deadline. This deadline is advisory, giving the callee some leeway, for example to drain clients or finish up other tasks.

    Definition Classes
    CloseOnceClosable
  10. def close(after: Duration): Future[Unit]

    Close the resource with the given timeout.

    Close the resource with the given timeout. This timeout is advisory, giving the callee some leeway, for example to drain clients or finish up other tasks.

    Definition Classes
    Closable
  11. final def close(): Future[Unit]

    Close the resource.

    Close the resource. The returned Future is completed when the resource has been fully relinquished.

    Definition Classes
    Closable
  12. final def closeFuture: Future[Unit]

    The Future satisfied upon completion of close.

    The Future satisfied upon completion of close.

    Attributes
    protected
    Definition Classes
    CloseOnce
    Note

    we do not expose direct access to the underlying closePromise, because the Promise state is mutable - we only want mutation to occur within this CloseOnce trait.

  13. final def closeOnExit(closable: Closable): Unit

    Close closable when shutdown is requested.

    Close closable when shutdown is requested. Closables are closed in parallel.

    Definition Classes
    App
  14. final def closeOnExitLast(closable: Closable): Unit

    Register a closable to be closed on application shutdown after those registered via closeOnExit.

    Register a closable to be closed on application shutdown after those registered via closeOnExit.

    Definition Classes
    App
    Note

    Application shutdown occurs in two sequential phases to allow explicit encoding of resource lifecycle relationships. Concretely this is useful for encoding that a monitoring resource should outlive a monitored resource. In all cases, the close deadline is enforced.

  15. def closeOnce(deadline: Time): Future[Unit]

    Close the resource with the given deadline exactly once.

    Close the resource with the given deadline exactly once. This deadline is advisory, giving the callee some leeway, for example to drain clients or finish up other tasks.

    Attributes
    protected
    Definition Classes
    AppCloseOnce
    Note

    if this method throws a synchronous exception, that exception will be wrapped in a failed future. If a fatal error is thrown synchronously, the error will be wrapped in a failed Future AND thrown directly.

  16. def defaultCloseGracePeriod: Duration

    Default amount of time to wait for shutdown.

    Default amount of time to wait for shutdown. This value is not used as a default if close() is called without parameters. It simply provides a default value to be passed as close(grace).

    Definition Classes
    App
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  19. def exitOnError(reason: String, details: => String): Unit

    The details Fn may be an expensive operation (which could fail).

    The details Fn may be an expensive operation (which could fail). We want to ensure that we've at least written the reason field to System.err before attempting to write the detail field so that users will at a minimum see the reason for the exit regardless of any extra details.

    Attributes
    protected
    Definition Classes
    App
  20. def exitOnError(reason: String): Unit

    Exit on error with the given reason String

    Exit on error with the given reason String

    Attributes
    protected
    Definition Classes
    App
  21. def exitOnError(throwable: Throwable): Unit

    Exit on error with the given Throwable

    Exit on error with the given Throwable

    Attributes
    protected
    Definition Classes
    App
  22. def failfastOnFlagsNotParsed: Boolean

    Users of this code should override this to true so that you fail-fast instead of being surprised at runtime by code that is reading from flags before they have been parsed.

    Users of this code should override this to true so that you fail-fast instead of being surprised at runtime by code that is reading from flags before they have been parsed.

    Ideally this would default to true, however, in order to avoid breaking existing users, it was introduced using false.

    Attributes
    protected
    Definition Classes
    App
  23. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  24. final def flag: Flags

    The com.twitter.app.Flags instance associated with this application

    The com.twitter.app.Flags instance associated with this application

    Definition Classes
    App
  25. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. def includeGlobalFlags: Boolean

    Whether or not to include GlobalFlag's when Flags are parsed

    Whether or not to include GlobalFlag's when Flags are parsed

    Attributes
    protected
    Definition Classes
    App
  28. final def init(f: => Unit): Unit

    Invoke f before anything else (including flag parsing).

    Invoke f before anything else (including flag parsing).

    Attributes
    protected
    Definition Classes
    App
  29. final def isClosed: Boolean

    Signals whether or not this Closable has been closed.

    Signals whether or not this Closable has been closed.

    returns

    return true if close has been initiated, false otherwise

    Definition Classes
    CloseOnce
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. def isReady(implicit permit: CanAwait): Boolean

    Is this Awaitable ready? In other words: would calling Awaitable.ready block?

    Is this Awaitable ready? In other words: would calling Awaitable.ready block?

    Definition Classes
    CloseOnceAwaitably0 → Awaitable
  32. def loadServiceBindings: Seq[Binding[_]]

    Programmatically specify which implementations to use in

    Programmatically specify which implementations to use in

    LoadService.apply for the given interfaces. This allows applications to circumvent the standard service loading mechanism when needed. It may be useful if the application has a broad and/or rapidly changing set of dependencies.

    For example, to require SuperCoolMetrics be used as the com.twitter.finagle.stats.StatsReceiver implementation:

    import com.initech.SuperCoolMetrics
    import com.twitter.app.App
    import com.twitter.app.LoadService.Binding
    import com.twitter.finagle.stats.StatsReceiver
    
    class MyApp extends App {
      val implementationToUse = new SuperCoolMetrics()
    
      override protected[this] val loadServiceBindings: Seq[Binding[_]] = {
        Seq(new Binding(classOf[StatsReceiver], implementationToUse))
      }
    
      def main(): Unit = {
        val loaded = LoadService[StatsReceiver]()
        assert(Seq(implementationToUse) == loaded)
      }
    }

    If this is called for a Class[T] after LoadService.apply has been called for that same interface, an IllegalStateException will be thrown. For this reason, bindings are done as early as possible in the application lifecycle, before even inits and flag parsing.

    returns

    a mapping from Class to the 1 or more implementations to be used by LoadService.apply for that interface.

    Attributes
    protected[this]
    Definition Classes
    App
    Note

    this should not generally be used by "libraries" as it forces their user's implementation choice.

    See also

    LoadService.apply

  33. def main(): Unit
  34. final def main(args: Array[String]): Unit
    Definition Classes
    App
  35. def name: String

    The name of the application, based on the classname

    The name of the application, based on the classname

    Definition Classes
    App
  36. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  37. final def nonExitingMain(args: Array[String]): Unit
    Definition Classes
    App
  38. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  39. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  40. final def observe(event: app.lifecycle.Event)(f: => Unit): Unit

    Notifies Observers of Events.

    Notifies Observers of Events.

    Attributes
    protected
    Definition Classes
    Lifecycle
  41. final def observeFuture(event: app.lifecycle.Event)(f: Future[Unit]): Future[Unit]

    Notifies Observers of com.twitter.util.Future Events.

    Notifies Observers of com.twitter.util.Future Events.

    Attributes
    protected
    Definition Classes
    Lifecycle
  42. final def onExit(f: => Unit): Unit

    Invoke f when shutdown is requested.

    Invoke f when shutdown is requested. Exit hooks run in parallel and are executed after all postmains complete. The thread resumes when all exit hooks complete or closeDeadline expires.

    Attributes
    protected
    Definition Classes
    App
    See also

    runOnExit(Runnable) for a variant that is more suitable for Java.

  43. final def onExitLast(f: => Unit): Unit

    Invoke f when shutdown is requested.

    Invoke f when shutdown is requested. Exit hooks run in parallel and are executed after all closeOnExit functions complete. The thread resumes when all exit hooks complete or closeDeadline expires.

    Attributes
    protected
    Definition Classes
    App
    See also

    runOnExitLast(Runnable) for a variant that is more suitable for Java.

  44. def parseArgs(args: Array[String]): Unit

    Parse the command line arguments as an Array of Strings.

    Parse the command line arguments as an Array of Strings. The default implementation parses the given String[] as Flag input values.

    Users may override this method to specify different functionality.

    args

    String Array which represents the command line input given to the application.

    Attributes
    protected[this]
    Definition Classes
    App
  45. final def postmain(f: => Unit): Unit

    Invoke f after the user's main has exited.

    Invoke f after the user's main has exited.

    Attributes
    protected
    Definition Classes
    App
  46. final def premain(f: => Unit): Unit

    Invoke f right before the user's main is invoked.

    Invoke f right before the user's main is invoked.

    Attributes
    protected
    Definition Classes
    App
  47. def ready(timeout: Duration)(implicit permit: CanAwait): ConfigurationLinter.this.type

    Support for Await.ready.

    Support for Await.ready. The use of the implicit permit is an access control mechanism: only Await.ready may call this method.

    Definition Classes
    CloseOnceAwaitably0 → Awaitable
  48. def result(timeout: Duration)(implicit permit: CanAwait): Unit

    Support for Await.result.

    Support for Await.result. The use of the implicit permit is an access control mechanism: only Await.result may call this method.

    Definition Classes
    CloseOnceAwaitably0 → Awaitable
  49. final def runOnExit(runnable: Runnable): Unit

    Invoke runnable.run() when shutdown is requested.

    Invoke runnable.run() when shutdown is requested. Exit hooks run in parallel and are executed after all postmains complete. The thread resumes when all exit hooks complete or closeDeadline expires.

    This is a Java friendly API to allow Java 8 users to invoke onExit with lambda expressions.

    For example (in Java):

    runOnExit(() -> {
     clientA.close();
     clientB.close();
    });
    Attributes
    protected
    Definition Classes
    App
    See also

    => Unit) for a variant that is more suitable for Scala.

  50. final def runOnExitLast(runnable: Runnable): Unit

    Invoke runnable.run() when shutdown is requested.

    Invoke runnable.run() when shutdown is requested. Exit hooks run in parallel and are executed after all closeOnExit functions complete. The thread resumes when all exit hooks complete or closeDeadline expires.

    This is a Java friendly API to allow Java 8 users to invoke onExitLast with lambda expressions.

    For example (in Java):

    runOnExitLast(() -> {
     clientA.close();
     clientB.close();
    });
    Attributes
    protected
    Definition Classes
    App
    See also

    => Unit) for a variant that is more suitable for Scala.

  51. lazy val shutdownTimer: Timer
    Attributes
    protected
    Definition Classes
    App
  52. def suppressGracefulShutdownErrors: Boolean

    By default any failure during the graceful shutdown portion of an App's lifecycle bubbles up and causes non-zero return codes in the process.

    By default any failure during the graceful shutdown portion of an App's lifecycle bubbles up and causes non-zero return codes in the process. Setting this to false allows an application to suppress these errors and express that graceful shutdown logic should not be a determinant of the process exit code.

    Attributes
    protected
    Definition Classes
    App
  53. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  54. def toString(): String
    Definition Classes
    AnyRef → Any
  55. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  56. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  57. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from App

Inherited from Lifecycle

Inherited from CloseOnceAwaitably

Inherited from CloseOnceAwaitably0[Unit]

Inherited from Awaitable[Unit]

Inherited from ClosableOnce

Inherited from CloseOnce

Inherited from Closable

Inherited from AnyRef

Inherited from Any

Ungrouped