Class LocalAsyncCache.AsyncAsMapView<K,​V>

  • All Implemented Interfaces:
    java.util.concurrent.ConcurrentMap<K,​java.util.concurrent.CompletableFuture<V>>, java.util.Map<K,​java.util.concurrent.CompletableFuture<V>>
    Enclosing interface:
    LocalAsyncCache<K,​V>

    public static final class LocalAsyncCache.AsyncAsMapView<K,​V>
    extends java.lang.Object
    implements java.util.concurrent.ConcurrentMap<K,​java.util.concurrent.CompletableFuture<V>>
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      java.util.concurrent.CompletableFuture<V> compute​(K key, java.util.function.BiFunction<? super K,​? super java.util.concurrent.CompletableFuture<V>,​? extends java.util.concurrent.CompletableFuture<V>> remappingFunction)  
      @Nullable java.util.concurrent.CompletableFuture<V> computeIfAbsent​(K key, java.util.function.Function<? super K,​? extends java.util.concurrent.CompletableFuture<V>> mappingFunction)  
      java.util.concurrent.CompletableFuture<V> computeIfPresent​(K key, java.util.function.BiFunction<? super K,​? super java.util.concurrent.CompletableFuture<V>,​? extends java.util.concurrent.CompletableFuture<V>> remappingFunction)  
      boolean containsKey​(java.lang.Object key)  
      boolean containsValue​(java.lang.Object value)  
      java.util.Set<java.util.Map.Entry<K,​java.util.concurrent.CompletableFuture<V>>> entrySet()  
      boolean equals​(java.lang.Object o)  
      @Nullable java.util.concurrent.CompletableFuture<V> get​(java.lang.Object key)  
      int hashCode()  
      boolean isEmpty()  
      java.util.Set<K> keySet()  
      java.util.concurrent.CompletableFuture<V> merge​(K key, java.util.concurrent.CompletableFuture<V> value, java.util.function.BiFunction<? super java.util.concurrent.CompletableFuture<V>,​? super java.util.concurrent.CompletableFuture<V>,​? extends java.util.concurrent.CompletableFuture<V>> remappingFunction)  
      java.util.concurrent.CompletableFuture<V> put​(K key, java.util.concurrent.CompletableFuture<V> value)  
      void putAll​(java.util.Map<? extends K,​? extends java.util.concurrent.CompletableFuture<V>> map)  
      java.util.concurrent.CompletableFuture<V> putIfAbsent​(K key, java.util.concurrent.CompletableFuture<V> value)  
      java.util.concurrent.CompletableFuture<V> remove​(java.lang.Object key)  
      boolean remove​(java.lang.Object key, java.lang.Object value)  
      java.util.concurrent.CompletableFuture<V> replace​(K key, java.util.concurrent.CompletableFuture<V> value)  
      boolean replace​(K key, java.util.concurrent.CompletableFuture<V> oldValue, java.util.concurrent.CompletableFuture<V> newValue)  
      int size()  
      java.lang.String toString()  
      java.util.Collection<java.util.concurrent.CompletableFuture<V>> values()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.concurrent.ConcurrentMap

        forEach, getOrDefault, replaceAll
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Map<K,​V>
      • size

        public int size()
        Specified by:
        size in interface java.util.Map<K,​V>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<K,​V>
      • containsKey

        public boolean containsKey​(java.lang.Object key)
        Specified by:
        containsKey in interface java.util.Map<K,​V>
      • containsValue

        public boolean containsValue​(java.lang.Object value)
        Specified by:
        containsValue in interface java.util.Map<K,​V>
      • get

        public @Nullable java.util.concurrent.CompletableFuture<V> get​(java.lang.Object key)
        Specified by:
        get in interface java.util.Map<K,​V>
      • putIfAbsent

        public java.util.concurrent.CompletableFuture<V> putIfAbsent​(K key,
                                                                     java.util.concurrent.CompletableFuture<V> value)
        Specified by:
        putIfAbsent in interface java.util.concurrent.ConcurrentMap<K,​V>
        Specified by:
        putIfAbsent in interface java.util.Map<K,​V>
      • put

        public java.util.concurrent.CompletableFuture<V> put​(K key,
                                                             java.util.concurrent.CompletableFuture<V> value)
        Specified by:
        put in interface java.util.Map<K,​V>
      • putAll

        public void putAll​(java.util.Map<? extends K,​? extends java.util.concurrent.CompletableFuture<V>> map)
        Specified by:
        putAll in interface java.util.Map<K,​V>
      • replace

        public java.util.concurrent.CompletableFuture<V> replace​(K key,
                                                                 java.util.concurrent.CompletableFuture<V> value)
        Specified by:
        replace in interface java.util.concurrent.ConcurrentMap<K,​V>
        Specified by:
        replace in interface java.util.Map<K,​V>
      • replace

        public boolean replace​(K key,
                               java.util.concurrent.CompletableFuture<V> oldValue,
                               java.util.concurrent.CompletableFuture<V> newValue)
        Specified by:
        replace in interface java.util.concurrent.ConcurrentMap<K,​V>
        Specified by:
        replace in interface java.util.Map<K,​V>
      • remove

        public java.util.concurrent.CompletableFuture<V> remove​(java.lang.Object key)
        Specified by:
        remove in interface java.util.Map<K,​V>
      • remove

        public boolean remove​(java.lang.Object key,
                              java.lang.Object value)
        Specified by:
        remove in interface java.util.concurrent.ConcurrentMap<K,​V>
        Specified by:
        remove in interface java.util.Map<K,​V>
      • computeIfAbsent

        public @Nullable java.util.concurrent.CompletableFuture<V> computeIfAbsent​(K key,
                                                                                   java.util.function.Function<? super K,​? extends java.util.concurrent.CompletableFuture<V>> mappingFunction)
        Specified by:
        computeIfAbsent in interface java.util.concurrent.ConcurrentMap<K,​V>
        Specified by:
        computeIfAbsent in interface java.util.Map<K,​V>
      • computeIfPresent

        public java.util.concurrent.CompletableFuture<V> computeIfPresent​(K key,
                                                                          java.util.function.BiFunction<? super K,​? super java.util.concurrent.CompletableFuture<V>,​? extends java.util.concurrent.CompletableFuture<V>> remappingFunction)
        Specified by:
        computeIfPresent in interface java.util.concurrent.ConcurrentMap<K,​V>
        Specified by:
        computeIfPresent in interface java.util.Map<K,​V>
      • compute

        public java.util.concurrent.CompletableFuture<V> compute​(K key,
                                                                 java.util.function.BiFunction<? super K,​? super java.util.concurrent.CompletableFuture<V>,​? extends java.util.concurrent.CompletableFuture<V>> remappingFunction)
        Specified by:
        compute in interface java.util.concurrent.ConcurrentMap<K,​V>
        Specified by:
        compute in interface java.util.Map<K,​V>
      • merge

        public java.util.concurrent.CompletableFuture<V> merge​(K key,
                                                               java.util.concurrent.CompletableFuture<V> value,
                                                               java.util.function.BiFunction<? super java.util.concurrent.CompletableFuture<V>,​? super java.util.concurrent.CompletableFuture<V>,​? extends java.util.concurrent.CompletableFuture<V>> remappingFunction)
        Specified by:
        merge in interface java.util.concurrent.ConcurrentMap<K,​V>
        Specified by:
        merge in interface java.util.Map<K,​V>
      • keySet

        public java.util.Set<K> keySet()
        Specified by:
        keySet in interface java.util.Map<K,​V>
      • values

        public java.util.Collection<java.util.concurrent.CompletableFuture<V>> values()
        Specified by:
        values in interface java.util.Map<K,​V>
      • entrySet

        public java.util.Set<java.util.Map.Entry<K,​java.util.concurrent.CompletableFuture<V>>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<K,​V>
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Map<K,​V>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map<K,​V>
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object