Interface NearCacheEntriesProvider<K,V,T>
public interface NearCacheEntriesProvider<K,V,T>
Near cache entries provider.
-
Method Summary
Modifier and TypeMethodDescriptiongetNearCacheKeyAsync(K key, boolean enforceKeyOnly) Serialize a key.getNearCacheKeysAsync(Iterable<? extends K> keys, boolean enforceKeyOnly) Serialize multiple keys.CompletableFuture<org.apache.ignite.internal.util.Pair<NearCacheKey<K,T>, NearCacheValue<V>>> getNearCacheValueAsync(@Nullable org.apache.ignite.tx.Transaction tx, NearCacheKey<K, T> key) Get a value paired with a serialized key that was used to obtain it.getNearCacheValuesAsync(@Nullable org.apache.ignite.tx.Transaction tx, Collection<NearCacheKey<K, T>> keys) Gets many values paired with a serialized key that was used to obtain it.voidsubscribeToNearCacheUpdates(Flow.Subscriber<org.apache.ignite.table.TableRowEventBatch<Map.Entry<K, V>>> subscriber, int updateInterval) Retrieves the cache value type.
-
Method Details
-
valueType
Retrieves the cache value type.- Returns:
- The cache value type.
-
getNearCacheKeyAsync
Serialize a key.- Parameters:
key- Key to serialize.enforceKeyOnly- Hints the underlying implementation that K must be key only.- Returns:
- Serialized key.
-
getNearCacheKeysAsync
CompletableFuture<Collection<NearCacheKey<K,T>>> getNearCacheKeysAsync(Iterable<? extends K> keys, boolean enforceKeyOnly) Serialize multiple keys.- Parameters:
keys- Keys to serialize.enforceKeyOnly- Hints the underlying implementation that K must be key only.- Returns:
- Serialized keys.
-
getNearCacheValueAsync
CompletableFuture<org.apache.ignite.internal.util.Pair<NearCacheKey<K,T>, getNearCacheValueAsyncNearCacheValue<V>>> (@Nullable @Nullable org.apache.ignite.tx.Transaction tx, NearCacheKey<K, T> key) Get a value paired with a serialized key that was used to obtain it.- Parameters:
tx- Transaction.key- Key.- Returns:
- A pair of serialized key that was used to get a value, and a nullable value itself.
-
getNearCacheValuesAsync
CompletableFuture<Map<NearCacheKey<K,T>, getNearCacheValuesAsyncNearCacheValue<V>>> (@Nullable @Nullable org.apache.ignite.tx.Transaction tx, Collection<NearCacheKey<K, T>> keys) Gets many values paired with a serialized key that was used to obtain it.- Parameters:
tx- Transaction.keys- Keys- Returns:
- A collection of pairs of serialized key that was used to get a value, and a nullable value itself.
-
subscribeToNearCacheUpdates
void subscribeToNearCacheUpdates(Flow.Subscriber<org.apache.ignite.table.TableRowEventBatch<Map.Entry<K, V>>> subscriber, int updateInterval)
-