Interface Loader<T>

Type Parameters:
T - 对象类型
All Known Implementing Classes:
AtomicLoader, LazyFunLoader, LazyLoader
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Loader<T>
对象加载抽象接口 通过实现此接口自定义实现对象的加载方式,例如懒加载机制、多线程加载等
Since:
Java 17+
Author:
Kimi Liu
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    获取一个准备好的对象 通过准备逻辑准备好被加载的对象,然后返回。在准备完毕之前此方法应该被阻塞
  • Method Details

    • get

      T get()
      获取一个准备好的对象 通过准备逻辑准备好被加载的对象,然后返回。在准备完毕之前此方法应该被阻塞
      Returns:
      加载完毕的对象