Interface EntityLoader<R,E>
-
- Type Parameters:
R
- The expected reference type (input)E
- The resulting entity type (output)
public interface EntityLoader<R,E>
Loads objects into memory using a reference and implementation-specific context.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <T> EntityLoader<T,T>
identity()
List<E>
loadBlocking(List<R> references, Deadline deadline)
Loads the entities corresponding to the given references, blocking the current thread while doing so.
-
-
-
Method Detail
-
loadBlocking
List<E> loadBlocking(List<R> references, Deadline deadline)
Loads the entities corresponding to the given references, blocking the current thread while doing so.- Parameters:
references
- A list of references to the objects to load.deadline
- The deadline for loading the entities, or null if there is no deadline.- Returns:
- A list of entities, in the same order the references were given.
null
is inserted when an object is not found.
-
identity
static <T> EntityLoader<T,T> identity()
-
-