Class NearCache<K,V,T>

java.lang.Object
org.gridgain.internal.table.nearcache.NearCache<K,V,T>
All Implemented Interfaces:
Closeable, AutoCloseable

public class NearCache<K,V,T> extends Object implements Closeable
Near Cache.
  • Constructor Details

    • NearCache

      public NearCache(NearCacheEntriesProvider<K,V,T> entriesProvider, org.apache.ignite.table.NearCacheOptions options)
      Constructor.
      Parameters:
      entriesProvider - Entries provider.
      options - Options.
  • Method Details

    • getAsync

      public CompletableFuture<NearCacheValue<V>> getAsync(K key)
      Get the value by the key asynchronously.
      Parameters:
      key - Key.
      Returns:
      Value if exists and null otherwise.
    • getAllAsync

      public CompletableFuture<Map<NearCacheKey<K,T>,NearCacheValue<V>>> getAllAsync(Collection<K> keys)
      Get values associated with given keys.
      Parameters:
      keys - Keys.
      Returns:
      Values associated with given keys. If a requested key does not exist, it will have no corresponding entry in the returned map.
    • invalidateAll

      public void invalidateAll()
      Invalidate all entries in the cache.
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • valueType

      public Class<V> valueType()