Class CachedSupplier<T>

org.elasticsearch.common.util.CachedSupplier<T>
All Implemented Interfaces:
<T>

public final class CachedSupplier<T> extends implements <T>
A that caches its return value. This may be useful to make a idempotent or for performance reasons if always returning the same instance is acceptable.
  • Constructor Summary

    Constructors
    Constructor
    Description
    <T> supplier)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
     

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Constructor Details

    • CachedSupplier

      public CachedSupplier(<T> supplier)
  • Method Details

    • get

      public T get()
      Specified by:
       in interface <T>