Class Scopes

org.elasticsearch.common.inject.Scopes

public class Scopes extends
Built-in scope implementations.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static Scope
    No scope; the same as not applying any scope at all.
    static Scope
    One instance per Injector.
  • Method Summary

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Field Details

    • SINGLETON

      public static final Scope SINGLETON
      One instance per Injector. Also see @Singleton.
    • NO_SCOPE

      public static final Scope NO_SCOPE
      No scope; the same as not applying any scope at all. Each time the Injector obtains an instance of an object with "no scope", it injects this instance then immediately forgets it. When the next request for the same binding arrives it will need to obtain the instance over again.

      This exists only in case a class has been annotated with a scope annotation such as @Singleton, and you need to override this to "no scope" in your binding.

      Since:
      2.0