Interface FirstLevelCache


public interface FirstLevelCache
  • Method Details

    • get

      <E extends Entity<E>> E get(@NonNull Entity.Id<E> id, @NonNull @NonNull Function<Entity.Id<E>,E> loader)
    • peek

      <E extends Entity<E>> Optional<E> peek(@NonNull Entity.Id<E> id)
    • snapshot

      <E extends Entity<E>> List<E> snapshot(@NonNull @NonNull Class<E> entityType)
      Returns a immutable copy of the entities of entityType type that are in the transaction L1 cache.
    • entities

      <E extends Entity<E>> Map<Entity.Id<E>,E> entities(@NonNull @NonNull Class<E> entityType)
      Returns a unmodifiable map containing the entities of entityType type that are in the transaction L1 cache. The returned map is a unmodifiable live view of transaction L1 cache; changes to second affect the first. To avoid an ConcurrentModificationException exception when iterating and simultaneous modification of the transaction L1 cache, you may need to make a copy.
    • put

      <E extends Entity<E>> void put(@NonNull E e)
    • putEmpty

      <E extends Entity<E>> void putEmpty(@NonNull Entity.Id<E> id)
    • containsKey

      <E extends Entity<E>> boolean containsKey(@NonNull Entity.Id<E> id)
    • empty

      static FirstLevelCache empty()
    • create

      static FirstLevelCache create()