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
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.gridgain.ignite.migrationtools.adapter.internal.AbstractCacheAdapter
AbstractCacheAdapter.MyCacheEntry -
Constructor Summary
ConstructorsConstructorDescriptionBinaryKeyValueViewAdapter(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. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.ignite.lang.IgniteFuture<Void>clearAllAsync(Set<? extends K> keys) org.apache.ignite.lang.IgniteFuture<Void>org.apache.ignite.lang.IgniteFuture<Void>clearAsync(K key) org.apache.ignite.lang.IgniteFuture<Boolean>containsKeyAsync(K key) voiddestroy()getAllAsync(Set<? extends K> keys) org.apache.ignite.lang.IgniteFuture<V>getAndPutAsync(K key, V val) org.apache.ignite.lang.IgniteFuture<V>getAndPutIfAbsentAsync(K key, V val) org.apache.ignite.lang.IgniteFuture<V>getAndRemoveAsync(K key) org.apache.ignite.lang.IgniteFuture<V>getAndReplaceAsync(K key, V val) org.apache.ignite.lang.IgniteFuture<V>getName()<T> org.apache.ignite.lang.IgniteFuture<T>invokeAsync(K key, javax.cache.processor.EntryProcessor<K, V, T> entryProcessor, Object... arguments) iterator()org.apache.ignite.lang.IgniteFuture<Void>putAllAsync(Map<? extends K, ? extends V> map) org.apache.ignite.lang.IgniteFuture<Void>org.apache.ignite.lang.IgniteFuture<Boolean>putIfAbsentAsync(K key, V val) <R> org.apache.ignite.cache.query.QueryCursor<R>query(org.apache.ignite.cache.query.Query<R> query) org.apache.ignite.cache.query.FieldsQueryCursor<List<?>>query(org.apache.ignite.cache.query.SqlFieldsQuery qry) org.apache.ignite.lang.IgniteFuture<Void>org.apache.ignite.lang.IgniteFuture<Void>removeAllAsync(Set<? extends K> keys) org.apache.ignite.lang.IgniteFuture<Boolean>removeAsync(K key) org.apache.ignite.lang.IgniteFuture<Boolean>removeAsync(K key, V oldVal) org.apache.ignite.lang.IgniteFuture<Boolean>replaceAsync(K key, V val) org.apache.ignite.lang.IgniteFuture<Boolean>replaceAsync(K key, V oldVal, V newVal) org.apache.ignite.lang.IgniteFuture<Long>sizeLongAsync(org.apache.ignite.cache.CachePeekMode... peekModes) <K1,V1> org.apache.ignite.IgniteCache<K1, V1> Methods inherited from class org.gridgain.ignite.migrationtools.adapter.internal.AbstractCacheAdapter
clear, clear, clearAll, clearStatistics, close, containsKey, containsKeys, containsKeysAsync, deregisterCacheEntryListener, enableStatistics, future, getAll, getAllOutTx, getAllOutTxAsync, getAndPut, getAndPutIfAbsent, getAndRemove, getAndReplace, getCacheManager, getConfiguration, getEntries, getEntriesAsync, getEntry, getEntryAsync, indexReadyFuture, invoke, invoke, invokeAll, invokeAll, invokeAll, invokeAllAsync, invokeAllAsync, invokeAllAsync, invokeAsync, isAsync, isClosed, isLocalLocked, loadAll, loadCache, loadCacheAsync, localClear, localClearAll, localEntries, localEntrySize, localEvict, localLoadCache, localLoadCacheAsync, localMetrics, localMxBean, localPeek, localPreloadPartition, localSize, localSizeLong, localSizeLong, lock, lockAll, lostPartitions, metrics, metrics, mxBean, preloadPartition, preloadPartitionAsync, put, putAll, putIfAbsent, query, queryDetailMetrics, queryMetrics, rebalance, registerCacheEntryListener, remove, remove, removeAll, removeAll, replace, replace, resetQueryDetailMetrics, resetQueryMetrics, size, sizeAsync, sizeLong, sizeLong, sizeLongAsync, touch, touchAsync, unwrap, withAllowAtomicOpsInTx, withAsync, withExpiryPolicy, withNoRetries, withPartitionRecover, withSkipStoreMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
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 moduleclientTable- Table modulekvView- View of the tablekeyConverter- Converter for the key.valueConverter- Converter for the value.
-
-
Method Details
-
getName
-
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.CacheExceptionorg.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
-
getAsync
-
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
-
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
-
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
-
clearAsync
-
clearAsync
-
clearAllAsync
-
invokeAsync
public <T> org.apache.ignite.lang.IgniteFuture<T> invokeAsync(K key, javax.cache.processor.EntryProcessor<K, V, throws org.apache.ignite.transactions.TransactionExceptionT> entryProcessor, Object... arguments) - Throws:
org.apache.ignite.transactions.TransactionException
-
destroy
public void destroy()
-