Class LazyCache<K,​V>

  • All Implemented Interfaces:
    PrivilegedAction<org.infinispan.Cache<K,​V>>, ConcurrentMap<K,​V>, Supplier<org.infinispan.Cache<K,​V>>, Map<K,​V>, org.infinispan.Cache<K,​V>, org.infinispan.commons.api.AsyncCache<K,​V>, org.infinispan.commons.api.BasicCache<K,​V>, org.infinispan.commons.api.BatchingCache, org.infinispan.commons.api.Lifecycle, org.infinispan.notifications.FilteringListenable<K,​V>, org.infinispan.notifications.Listenable

    public class LazyCache<K,​V>
    extends LazyBasicCache<K,​V,​org.infinispan.Cache<K,​V>>
    implements org.infinispan.Cache<K,​V>
    An embedded cache that resolves itself from its cache container lazily.
    Author:
    Paul Ferraro
    • Constructor Detail

      • LazyCache

        public LazyCache​(org.infinispan.manager.EmbeddedCacheManager container,
                         String name)
    • Method Detail

      • getCacheManager

        public org.infinispan.manager.EmbeddedCacheManager getCacheManager()
        Specified by:
        getCacheManager in interface org.infinispan.Cache<K,​V>
      • getAdvancedCache

        public org.infinispan.AdvancedCache<K,​V> getAdvancedCache()
        Specified by:
        getAdvancedCache in interface org.infinispan.Cache<K,​V>
      • getCacheConfiguration

        public org.infinispan.configuration.cache.Configuration getCacheConfiguration()
        Specified by:
        getCacheConfiguration in interface org.infinispan.Cache<K,​V>
      • getListeners

        @Deprecated
        public Set<Object> getListeners()
        Deprecated.
        Specified by:
        getListeners in interface org.infinispan.notifications.Listenable
      • getStatus

        public org.infinispan.lifecycle.ComponentStatus getStatus()
        Specified by:
        getStatus in interface org.infinispan.Cache<K,​V>
      • startBatch

        public boolean startBatch()
        Specified by:
        startBatch in interface org.infinispan.commons.api.BatchingCache
      • endBatch

        public void endBatch​(boolean successful)
        Specified by:
        endBatch in interface org.infinispan.commons.api.BatchingCache
      • entrySet

        public org.infinispan.CacheSet<Map.Entry<K,​V>> entrySet()
        Specified by:
        entrySet in interface org.infinispan.Cache<K,​V>
        Specified by:
        entrySet in interface Map<K,​V>
        Overrides:
        entrySet in class LazyBasicCache<K,​V,​org.infinispan.Cache<K,​V>>
      • keySet

        public org.infinispan.CacheSet<K> keySet()
        Specified by:
        keySet in interface org.infinispan.Cache<K,​V>
        Specified by:
        keySet in interface Map<K,​V>
        Overrides:
        keySet in class LazyBasicCache<K,​V,​org.infinispan.Cache<K,​V>>
      • values

        public org.infinispan.CacheCollection<V> values()
        Specified by:
        values in interface org.infinispan.Cache<K,​V>
        Specified by:
        values in interface Map<K,​V>
        Overrides:
        values in class LazyBasicCache<K,​V,​org.infinispan.Cache<K,​V>>
      • evict

        public void evict​(K key)
        Specified by:
        evict in interface org.infinispan.Cache<K,​V>
      • putForExternalRead

        public void putForExternalRead​(K key,
                                       V value)
        Specified by:
        putForExternalRead in interface org.infinispan.Cache<K,​V>
      • putForExternalRead

        public void putForExternalRead​(K key,
                                       V value,
                                       long lifespan,
                                       TimeUnit lifespanUnit)
        Specified by:
        putForExternalRead in interface org.infinispan.Cache<K,​V>
      • putForExternalRead

        public void putForExternalRead​(K key,
                                       V value,
                                       long lifespan,
                                       TimeUnit lifespanUnit,
                                       long maxIdle,
                                       TimeUnit maxIdleUnit)
        Specified by:
        putForExternalRead in interface org.infinispan.Cache<K,​V>
      • addListenerAsync

        public CompletionStage<Void> addListenerAsync​(Object listener)
        Specified by:
        addListenerAsync in interface org.infinispan.notifications.Listenable
      • addListenerAsync

        public <C> CompletionStage<Void> addListenerAsync​(Object listener,
                                                          org.infinispan.notifications.cachelistener.filter.CacheEventFilter<? super K,​? super V> filter,
                                                          org.infinispan.notifications.cachelistener.filter.CacheEventConverter<? super K,​? super V,​C> converter)
        Specified by:
        addListenerAsync in interface org.infinispan.notifications.FilteringListenable<K,​V>
      • addFilteredListenerAsync

        public <C> CompletionStage<Void> addFilteredListenerAsync​(Object listener,
                                                                  org.infinispan.notifications.cachelistener.filter.CacheEventFilter<? super K,​? super V> filter,
                                                                  org.infinispan.notifications.cachelistener.filter.CacheEventConverter<? super K,​? super V,​C> converter,
                                                                  Set<Class<? extends Annotation>> filterAnnotations)
        Specified by:
        addFilteredListenerAsync in interface org.infinispan.notifications.FilteringListenable<K,​V>
      • addStorageFormatFilteredListenerAsync

        public <C> CompletionStage<Void> addStorageFormatFilteredListenerAsync​(Object listener,
                                                                               org.infinispan.notifications.cachelistener.filter.CacheEventFilter<? super K,​? super V> filter,
                                                                               org.infinispan.notifications.cachelistener.filter.CacheEventConverter<? super K,​? super V,​C> converter,
                                                                               Set<Class<? extends Annotation>> filterAnnotations)
        Specified by:
        addStorageFormatFilteredListenerAsync in interface org.infinispan.notifications.FilteringListenable<K,​V>
      • removeListenerAsync

        public CompletionStage<Void> removeListenerAsync​(Object listener)
        Specified by:
        removeListenerAsync in interface org.infinispan.notifications.Listenable