Interface CacheEntryCreator<I,V,C>

Type Parameters:
I - the logical identifier of the created value
V - the created value type
C - the context of the created type
All Known Subinterfaces:
BiCacheEntryCreator<I,K,V,C>, SessionAttributesFactory<C,V>, SessionFactory<DC,MV,AV,SC>, SessionMetaDataFactory<V>, UserContextFactory<V,PC,TC>, UserFactory<CV,C,T,SV,D,S>, UserSessionsFactory<V,D,S>
All Known Implementing Classes:
CoarseSessionAttributesFactory, CoarseSessionAttributesFactory, CompositeSessionFactory, CompositeUserFactory, FineSessionAttributesFactory, FineSessionAttributesFactory, HotRodSessionFactory, HotRodSessionMetaDataFactory, HotRodUserContextFactory, HotRodUserSessionsFactory, InfinispanSessionMetaDataFactory, InfinispanUserContextFactory, InfinispanUserSessionsFactory

public interface CacheEntryCreator<I,V,C>
Creates an entry in a cache.
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    default V
    createValue(I id, C context)
    Creates a value in the cache, if it does not already exist.
    createValueAsync(I id, C context)
    Creates a value in the cache, if it does not already exist.
  • Method Details

    • createValue

      default V createValue(I id, C context)
      Creates a value in the cache, if it does not already exist.
      Parameters:
      id - the cache entry identifier.
      context - the context of the created value
      Returns:
      the new value, or the existing value the cache entry already exists.
    • createValueAsync

      CompletionStage<V> createValueAsync(I id, C context)
      Creates a value in the cache, if it does not already exist.
      Parameters:
      id - the cache entry identifier.
      context - the context of the created value
      Returns:
      the new value, or the existing value the cache entry already exists.