Class BinaryKeyValueViewAdapter<K,V>

java.lang.Object
org.gridgain.ignite.migrationtools.adapter.internal.AbstractCacheAdapter<K,V>
org.gridgain.ignite.migrationtools.adapter.internal.BinaryKeyValueViewAdapter<K,V>
Type Parameters:
K - Key Type.
V - Value Type.
All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<javax.cache.Cache.Entry<K,V>>, javax.cache.Cache<K,V>, org.apache.ignite.IgniteCache<K,V>, org.apache.ignite.lang.IgniteAsyncSupport

public class BinaryKeyValueViewAdapter<K,V> extends AbstractCacheAdapter<K,V>
Tries to Adapt a KeyValueView into an Ignite2 Cache. It is a bit tricky because the Ignite2 API will make objects default to their native type if they can. This is not the same behaviour as Ignite3
  • Constructor Details

    • BinaryKeyValueViewAdapter

      public BinaryKeyValueViewAdapter(org.apache.ignite3.compute.IgniteCompute compute, org.apache.ignite3.internal.client.table.ClientTable clientTable, org.apache.ignite3.table.KeyValueView<org.apache.ignite3.table.Tuple,org.apache.ignite3.table.Tuple> kvView, org.gridgain.ignite.migrationtools.adapter.converters.TypeConverter<org.apache.ignite3.table.Tuple,K> keyConverter, org.gridgain.ignite.migrationtools.adapter.converters.TypeConverter<org.apache.ignite3.table.Tuple,V> valueConverter)
      Constructor.
      Parameters:
      compute - Compute module
      clientTable - Table module
      kvView - View of the table
      keyConverter - Converter for the key.
      valueConverter - Converter for the value.
  • Method Details

    • getName

      public String getName()
    • iterator

      public Iterator<javax.cache.Cache.Entry<K,V>> iterator()
    • withKeepBinary

      public <K1, V1> org.apache.ignite.IgniteCache<K1,V1> withKeepBinary()
    • getAndPutIfAbsentAsync

      public org.apache.ignite.lang.IgniteFuture<V> getAndPutIfAbsentAsync(K key, V val) throws javax.cache.CacheException, org.apache.ignite.transactions.TransactionException
      Throws:
      javax.cache.CacheException
      org.apache.ignite.transactions.TransactionException
    • query

      public <R> org.apache.ignite.cache.query.QueryCursor<R> query(org.apache.ignite.cache.query.Query<R> query)
    • query

      public org.apache.ignite.cache.query.FieldsQueryCursor<List<?>> query(org.apache.ignite.cache.query.SqlFieldsQuery qry)
    • sizeLongAsync

      public org.apache.ignite.lang.IgniteFuture<Long> sizeLongAsync(org.apache.ignite.cache.CachePeekMode... peekModes) throws javax.cache.CacheException
      Throws:
      javax.cache.CacheException
    • get

      public V get(K key) throws org.apache.ignite.transactions.TransactionException
      Specified by:
      get in interface javax.cache.Cache<K,V>
      Specified by:
      get in interface org.apache.ignite.IgniteCache<K,V>
      Overrides:
      get in class AbstractCacheAdapter<K,V>
      Throws:
      org.apache.ignite.transactions.TransactionException
    • getAsync

      public org.apache.ignite.lang.IgniteFuture<V> getAsync(K key)
    • getAllAsync

      public org.apache.ignite.lang.IgniteFuture<Map<K,V>> getAllAsync(Set<? extends K> keys) throws org.apache.ignite.transactions.TransactionException
      Throws:
      org.apache.ignite.transactions.TransactionException
    • containsKeyAsync

      public org.apache.ignite.lang.IgniteFuture<Boolean> containsKeyAsync(K key) throws org.apache.ignite.transactions.TransactionException
      Throws:
      org.apache.ignite.transactions.TransactionException
    • putAsync

      public org.apache.ignite.lang.IgniteFuture<Void> putAsync(K key, V val) throws org.apache.ignite.transactions.TransactionException
      Throws:
      org.apache.ignite.transactions.TransactionException
    • getAndPutAsync

      public org.apache.ignite.lang.IgniteFuture<V> getAndPutAsync(K key, V val) throws org.apache.ignite.transactions.TransactionException
      Throws:
      org.apache.ignite.transactions.TransactionException
    • putAllAsync

      public org.apache.ignite.lang.IgniteFuture<Void> putAllAsync(Map<? extends K,? extends V> map) throws org.apache.ignite.transactions.TransactionException
      Throws:
      org.apache.ignite.transactions.TransactionException
    • putIfAbsentAsync

      public org.apache.ignite.lang.IgniteFuture<Boolean> putIfAbsentAsync(K key, V val)
    • removeAsync

      public org.apache.ignite.lang.IgniteFuture<Boolean> removeAsync(K key) throws org.apache.ignite.transactions.TransactionException
      Throws:
      org.apache.ignite.transactions.TransactionException
    • removeAsync

      public org.apache.ignite.lang.IgniteFuture<Boolean> removeAsync(K key, V oldVal) throws org.apache.ignite.transactions.TransactionException
      Throws:
      org.apache.ignite.transactions.TransactionException
    • getAndRemoveAsync

      public org.apache.ignite.lang.IgniteFuture<V> getAndRemoveAsync(K key) throws org.apache.ignite.transactions.TransactionException
      Throws:
      org.apache.ignite.transactions.TransactionException
    • replaceAsync

      public org.apache.ignite.lang.IgniteFuture<Boolean> replaceAsync(K key, V oldVal, V newVal) throws org.apache.ignite.transactions.TransactionException
      Throws:
      org.apache.ignite.transactions.TransactionException
    • replaceAsync

      public org.apache.ignite.lang.IgniteFuture<Boolean> replaceAsync(K key, V val) throws org.apache.ignite.transactions.TransactionException
      Throws:
      org.apache.ignite.transactions.TransactionException
    • getAndReplaceAsync

      public org.apache.ignite.lang.IgniteFuture<V> getAndReplaceAsync(K key, V val)
    • removeAllAsync

      public org.apache.ignite.lang.IgniteFuture<Void> removeAllAsync(Set<? extends K> keys) throws org.apache.ignite.transactions.TransactionException
      Throws:
      org.apache.ignite.transactions.TransactionException
    • removeAllAsync

      public org.apache.ignite.lang.IgniteFuture<Void> removeAllAsync()
    • clearAsync

      public org.apache.ignite.lang.IgniteFuture<Void> clearAsync()
    • clearAsync

      public org.apache.ignite.lang.IgniteFuture<Void> clearAsync(K key)
    • clearAllAsync

      public org.apache.ignite.lang.IgniteFuture<Void> clearAllAsync(Set<? extends K> keys)
    • invokeAsync

      public <T> org.apache.ignite.lang.IgniteFuture<T> invokeAsync(K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... arguments) throws org.apache.ignite.transactions.TransactionException
      Throws:
      org.apache.ignite.transactions.TransactionException
    • destroy

      public void destroy()