Class NearCacheKeyValueView<K,V,T>

java.lang.Object
org.gridgain.internal.table.nearcache.NearCacheKeyValueView<K,V,T>
All Implemented Interfaces:
AutoCloseable, org.apache.ignite.table.ContinuousQuerySource<Map.Entry<K,V>>, org.apache.ignite.table.criteria.CriteriaQuerySource<Map.Entry<K,V>>, org.apache.ignite.table.DataStreamerTarget<Map.Entry<K,V>>, org.apache.ignite.table.KeyValueView<K,V>

public class NearCacheKeyValueView<K,V,T> extends Object implements org.apache.ignite.table.KeyValueView<K,V>
Key-value view implementation.
  • Constructor Details

    • NearCacheKeyValueView

      public NearCacheKeyValueView(org.apache.ignite.table.KeyValueView<K,V> delegate, NearCache<K,V,T> nearCache)
      Constructor.
      Parameters:
      delegate - Delegate view.
      nearCache - Near cache.
  • Method Details

    • get

      public V get(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key)
      Specified by:
      get in interface org.apache.ignite.table.KeyValueView<K,V>
    • getAsync

      public CompletableFuture<V> getAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key)
      Specified by:
      getAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • getNullable

      @Nullable public @Nullable org.apache.ignite.lang.NullableValue<V> getNullable(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key)
      Specified by:
      getNullable in interface org.apache.ignite.table.KeyValueView<K,V>
    • getNullableAsync

      public CompletableFuture<org.apache.ignite.lang.NullableValue<V>> getNullableAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key)
      Specified by:
      getNullableAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • getOrDefault

      public V getOrDefault(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, V defaultValue)
      Specified by:
      getOrDefault in interface org.apache.ignite.table.KeyValueView<K,V>
    • getOrDefaultAsync

      public CompletableFuture<V> getOrDefaultAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V defaultValue)
      Specified by:
      getOrDefaultAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • getAll

      public Map<K,V> getAll(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, Collection<K> keys)
      Specified by:
      getAll in interface org.apache.ignite.table.KeyValueView<K,V>
    • getAllAsync

      public CompletableFuture<Map<K,V>> getAllAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, Collection<K> keys)
      Specified by:
      getAllAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • contains

      public boolean contains(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key)
      Specified by:
      contains in interface org.apache.ignite.table.KeyValueView<K,V>
    • containsAsync

      public CompletableFuture<Boolean> containsAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key)
      Specified by:
      containsAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • containsAll

      public boolean containsAll(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, Collection<K> keys)
      Specified by:
      containsAll in interface org.apache.ignite.table.KeyValueView<K,V>
    • containsAllAsync

      public CompletableFuture<Boolean> containsAllAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, Collection<K> keys)
      Specified by:
      containsAllAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • put

      public void put(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V val)
      Specified by:
      put in interface org.apache.ignite.table.KeyValueView<K,V>
    • putAsync

      public CompletableFuture<Void> putAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V val)
      Specified by:
      putAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • putAll

      public void putAll(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, Map<K,V> pairs)
      Specified by:
      putAll in interface org.apache.ignite.table.KeyValueView<K,V>
    • putAllAsync

      public CompletableFuture<Void> putAllAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, Map<K,V> pairs)
      Specified by:
      putAllAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • getAndPut

      @Nullable public V getAndPut(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V val)
      Specified by:
      getAndPut in interface org.apache.ignite.table.KeyValueView<K,V>
    • getAndPutAsync

      public CompletableFuture<V> getAndPutAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V val)
      Specified by:
      getAndPutAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • getNullableAndPut

      public org.apache.ignite.lang.NullableValue<V> getNullableAndPut(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V val)
      Specified by:
      getNullableAndPut in interface org.apache.ignite.table.KeyValueView<K,V>
    • getNullableAndPutAsync

      public CompletableFuture<org.apache.ignite.lang.NullableValue<V>> getNullableAndPutAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V val)
      Specified by:
      getNullableAndPutAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • putIfAbsent

      public boolean putIfAbsent(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V val)
      Specified by:
      putIfAbsent in interface org.apache.ignite.table.KeyValueView<K,V>
    • putIfAbsentAsync

      public CompletableFuture<Boolean> putIfAbsentAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V val)
      Specified by:
      putIfAbsentAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • remove

      public boolean remove(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key)
      Specified by:
      remove in interface org.apache.ignite.table.KeyValueView<K,V>
    • remove

      public boolean remove(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, V val)
      Specified by:
      remove in interface org.apache.ignite.table.KeyValueView<K,V>
    • removeAsync

      public CompletableFuture<Boolean> removeAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key)
      Specified by:
      removeAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • removeAsync

      public CompletableFuture<Boolean> removeAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, V val)
      Specified by:
      removeAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • removeAll

      public void removeAll(@Nullable @Nullable org.apache.ignite.tx.Transaction tx)
      Specified by:
      removeAll in interface org.apache.ignite.table.KeyValueView<K,V>
    • removeAll

      public Collection<K> removeAll(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, Collection<K> keys)
      Specified by:
      removeAll in interface org.apache.ignite.table.KeyValueView<K,V>
    • removeAllAsync

      public CompletableFuture<Collection<K>> removeAllAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, Collection<K> keys)
      Specified by:
      removeAllAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • removeAllAsync

      public CompletableFuture<Void> removeAllAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx)
      Specified by:
      removeAllAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • getAndRemove

      @Nullable public V getAndRemove(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key)
      Specified by:
      getAndRemove in interface org.apache.ignite.table.KeyValueView<K,V>
    • getAndRemoveAsync

      public CompletableFuture<V> getAndRemoveAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key)
      Specified by:
      getAndRemoveAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • getNullableAndRemove

      public org.apache.ignite.lang.NullableValue<V> getNullableAndRemove(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key)
      Specified by:
      getNullableAndRemove in interface org.apache.ignite.table.KeyValueView<K,V>
    • getNullableAndRemoveAsync

      public CompletableFuture<org.apache.ignite.lang.NullableValue<V>> getNullableAndRemoveAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key)
      Specified by:
      getNullableAndRemoveAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • replace

      public boolean replace(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V val)
      Specified by:
      replace in interface org.apache.ignite.table.KeyValueView<K,V>
    • replace

      public boolean replace(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V oldValue, @Nullable V newValue)
      Specified by:
      replace in interface org.apache.ignite.table.KeyValueView<K,V>
    • replaceAsync

      public CompletableFuture<Boolean> replaceAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V val)
      Specified by:
      replaceAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • replaceAsync

      public CompletableFuture<Boolean> replaceAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V oldVal, @Nullable V newVal)
      Specified by:
      replaceAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • getAndReplace

      @Nullable public V getAndReplace(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V val)
      Specified by:
      getAndReplace in interface org.apache.ignite.table.KeyValueView<K,V>
    • getAndReplaceAsync

      public CompletableFuture<V> getAndReplaceAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V val)
      Specified by:
      getAndReplaceAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • getNullableAndReplace

      public org.apache.ignite.lang.NullableValue<V> getNullableAndReplace(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V val)
      Specified by:
      getNullableAndReplace in interface org.apache.ignite.table.KeyValueView<K,V>
    • getNullableAndReplaceAsync

      public CompletableFuture<org.apache.ignite.lang.NullableValue<V>> getNullableAndReplaceAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, K key, @Nullable V val)
      Specified by:
      getNullableAndReplaceAsync in interface org.apache.ignite.table.KeyValueView<K,V>
    • queryContinuously

      public void queryContinuously(Flow.Subscriber<org.apache.ignite.table.TableRowEventBatch<Map.Entry<K,V>>> subscriber, @Nullable @Nullable org.apache.ignite.table.ContinuousQueryOptions options)
      Specified by:
      queryContinuously in interface org.apache.ignite.table.ContinuousQuerySource<K>
    • streamData

      public CompletableFuture<Void> streamData(Flow.Publisher<org.apache.ignite.table.DataStreamerItem<Map.Entry<K,V>>> publisher, @Nullable @Nullable org.apache.ignite.table.DataStreamerOptions options)
      Specified by:
      streamData in interface org.apache.ignite.table.DataStreamerTarget<K>
    • streamData

      public <E, P, A, R> CompletableFuture<Void> streamData(Flow.Publisher<E> publisher, org.apache.ignite.table.DataStreamerReceiverDescriptor<P,A,R> receiver, Function<E,Map.Entry<K,V>> keyFunc, Function<E,P> payloadFunc, @Nullable A receiverArg, @Nullable @Nullable Flow.Subscriber<R> resultSubscriber, @Nullable @Nullable org.apache.ignite.table.DataStreamerOptions options)
      Specified by:
      streamData in interface org.apache.ignite.table.DataStreamerTarget<K>
    • query

      public org.apache.ignite.lang.Cursor<Map.Entry<K,V>> query(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, @Nullable @Nullable org.apache.ignite.table.criteria.Criteria criteria, @Nullable @Nullable String indexName, @Nullable @Nullable org.apache.ignite.table.criteria.CriteriaQueryOptions opts)
      Specified by:
      query in interface org.apache.ignite.table.criteria.CriteriaQuerySource<K>
    • queryAsync

      public CompletableFuture<org.apache.ignite.lang.AsyncCursor<Map.Entry<K,V>>> queryAsync(@Nullable @Nullable org.apache.ignite.tx.Transaction tx, @Nullable @Nullable org.apache.ignite.table.criteria.Criteria criteria, @Nullable @Nullable String indexName, @Nullable @Nullable org.apache.ignite.table.criteria.CriteriaQueryOptions opts)
      Specified by:
      queryAsync in interface org.apache.ignite.table.criteria.CriteriaQuerySource<K>
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception