Scope (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.di, interface: Scope

# Interface Scope

All Known Implementing Classes:
  `DefaultScope`

public interface Scope
Defines the scope of the instances created by the DI container. I.e. whether instances are shared between the callers, and for how longs or whether they are created anew. Scope object is also used to tie DI-produced instances to the Injector events, such as shutdown. Default scope in Cayenne DI is "singleton".

Since:
  3.1

- ## Method Summary

  Modifier and Type
  Method
  Description
  `<T> Provider<T>`
  `scope(Provider<T> unscoped)`

- ## Method Details

  - ### scope

    <T> Provider<T> scope(Provider<T> unscoped)