Class AbstractCacheAdapter<K,V>

java.lang.Object
org.gridgain.ignite.migrationtools.adapter.internal.AbstractCacheAdapter<K,V>
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
Direct Known Subclasses:
BinaryKeyValueViewAdapter, MappedKeyValueViewAdapterImpl

public abstract class AbstractCacheAdapter<K,V> extends Object implements org.apache.ignite.IgniteCache<K,V>
  • Constructor Details

    • AbstractCacheAdapter

      public AbstractCacheAdapter()
  • Method Details

    • get

      public V get(K k)
      Specified by:
      get in interface javax.cache.Cache<K,V>
      Specified by:
      get in interface org.apache.ignite.IgniteCache<K,V>
    • getAll

      public Map<K,V> getAll(Set<? extends K> set)
      Specified by:
      getAll in interface javax.cache.Cache<K,V>
      Specified by:
      getAll in interface org.apache.ignite.IgniteCache<K,V>
    • containsKey

      public boolean containsKey(K k)
      Specified by:
      containsKey in interface javax.cache.Cache<K,V>
      Specified by:
      containsKey in interface org.apache.ignite.IgniteCache<K,V>
    • put

      public void put(K k, V v)
      Specified by:
      put in interface javax.cache.Cache<K,V>
      Specified by:
      put in interface org.apache.ignite.IgniteCache<K,V>
    • getAndPut

      public V getAndPut(K k, V v)
      Specified by:
      getAndPut in interface javax.cache.Cache<K,V>
      Specified by:
      getAndPut in interface org.apache.ignite.IgniteCache<K,V>
    • putAll

      public void putAll(Map<? extends K,? extends V> map)
      Specified by:
      putAll in interface javax.cache.Cache<K,V>
      Specified by:
      putAll in interface org.apache.ignite.IgniteCache<K,V>
    • putIfAbsent

      public boolean putIfAbsent(K k, V v)
      Specified by:
      putIfAbsent in interface javax.cache.Cache<K,V>
      Specified by:
      putIfAbsent in interface org.apache.ignite.IgniteCache<K,V>
    • remove

      public boolean remove(K k)
      Specified by:
      remove in interface javax.cache.Cache<K,V>
      Specified by:
      remove in interface org.apache.ignite.IgniteCache<K,V>
    • remove

      public boolean remove(K k, V v)
      Specified by:
      remove in interface javax.cache.Cache<K,V>
      Specified by:
      remove in interface org.apache.ignite.IgniteCache<K,V>
    • getAndRemove

      public V getAndRemove(K k)
      Specified by:
      getAndRemove in interface javax.cache.Cache<K,V>
      Specified by:
      getAndRemove in interface org.apache.ignite.IgniteCache<K,V>
    • replace

      public boolean replace(K k, V v, V v1)
      Specified by:
      replace in interface javax.cache.Cache<K,V>
      Specified by:
      replace in interface org.apache.ignite.IgniteCache<K,V>
    • replace

      public boolean replace(K k, V v)
      Specified by:
      replace in interface javax.cache.Cache<K,V>
      Specified by:
      replace in interface org.apache.ignite.IgniteCache<K,V>
    • getAndReplace

      public V getAndReplace(K k, V v)
      Specified by:
      getAndReplace in interface javax.cache.Cache<K,V>
      Specified by:
      getAndReplace in interface org.apache.ignite.IgniteCache<K,V>
    • removeAll

      public void removeAll(Set<? extends K> set)
      Specified by:
      removeAll in interface javax.cache.Cache<K,V>
      Specified by:
      removeAll in interface org.apache.ignite.IgniteCache<K,V>
    • loadAll

      public void loadAll(Set<? extends K> set, boolean b, javax.cache.integration.CompletionListener listener)
      Specified by:
      loadAll in interface javax.cache.Cache<K,V>
    • removeAll

      public void removeAll()
      Specified by:
      removeAll in interface javax.cache.Cache<K,V>
      Specified by:
      removeAll in interface org.apache.ignite.IgniteCache<K,V>
    • clear

      public void clear()
      Specified by:
      clear in interface javax.cache.Cache<K,V>
      Specified by:
      clear in interface org.apache.ignite.IgniteCache<K,V>
    • getConfiguration

      public <C extends javax.cache.configuration.Configuration<K, V>> C getConfiguration(Class<C> klass)
      Specified by:
      getConfiguration in interface javax.cache.Cache<K,V>
      Specified by:
      getConfiguration in interface org.apache.ignite.IgniteCache<K,V>
    • getCacheManager

      public javax.cache.CacheManager getCacheManager()
      Specified by:
      getCacheManager in interface javax.cache.Cache<K,V>
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface javax.cache.Cache<K,V>
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.apache.ignite.IgniteCache<K,V>
    • isClosed

      public boolean isClosed()
      Specified by:
      isClosed in interface javax.cache.Cache<K,V>
    • unwrap

      public <T> T unwrap(Class<T> klass)
      Specified by:
      unwrap in interface javax.cache.Cache<K,V>
    • registerCacheEntryListener

      public void registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> configuration)
      Specified by:
      registerCacheEntryListener in interface javax.cache.Cache<K,V>
    • deregisterCacheEntryListener

      public void deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> configuration)
      Specified by:
      deregisterCacheEntryListener in interface javax.cache.Cache<K,V>
    • withAsync

      public org.apache.ignite.IgniteCache<K,V> withAsync()
      Specified by:
      withAsync in interface org.apache.ignite.lang.IgniteAsyncSupport
      Specified by:
      withAsync in interface org.apache.ignite.IgniteCache<K,V>
    • isAsync

      public boolean isAsync()
      Specified by:
      isAsync in interface org.apache.ignite.lang.IgniteAsyncSupport
    • future

      public <R> org.apache.ignite.lang.IgniteFuture<R> future()
      Specified by:
      future in interface org.apache.ignite.lang.IgniteAsyncSupport
    • withExpiryPolicy

      public org.apache.ignite.IgniteCache<K,V> withExpiryPolicy(javax.cache.expiry.ExpiryPolicy plc)
      Specified by:
      withExpiryPolicy in interface org.apache.ignite.IgniteCache<K,V>
    • withSkipStore

      public org.apache.ignite.IgniteCache<K,V> withSkipStore()
      Specified by:
      withSkipStore in interface org.apache.ignite.IgniteCache<K,V>
    • withNoRetries

      public org.apache.ignite.IgniteCache<K,V> withNoRetries()
      Specified by:
      withNoRetries in interface org.apache.ignite.IgniteCache<K,V>
    • withPartitionRecover

      public org.apache.ignite.IgniteCache<K,V> withPartitionRecover()
      Specified by:
      withPartitionRecover in interface org.apache.ignite.IgniteCache<K,V>
    • withAllowAtomicOpsInTx

      public <K1, V1> org.apache.ignite.IgniteCache<K1,V1> withAllowAtomicOpsInTx()
      Specified by:
      withAllowAtomicOpsInTx in interface org.apache.ignite.IgniteCache<K,V>
    • loadCache

      public void loadCache(@Nullable @Nullable org.apache.ignite.lang.IgniteBiPredicate<K,V> p, @Nullable @Nullable Object... args) throws javax.cache.CacheException
      Specified by:
      loadCache in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      javax.cache.CacheException
    • loadCacheAsync

      public org.apache.ignite.lang.IgniteFuture<Void> loadCacheAsync(@Nullable @Nullable org.apache.ignite.lang.IgniteBiPredicate<K,V> p, @Nullable @Nullable Object... args) throws javax.cache.CacheException
      Specified by:
      loadCacheAsync in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      javax.cache.CacheException
    • localLoadCache

      public void localLoadCache(@Nullable @Nullable org.apache.ignite.lang.IgniteBiPredicate<K,V> p, @Nullable @Nullable Object... args) throws javax.cache.CacheException
      Specified by:
      localLoadCache in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      javax.cache.CacheException
    • localLoadCacheAsync

      public org.apache.ignite.lang.IgniteFuture<Void> localLoadCacheAsync(@Nullable @Nullable org.apache.ignite.lang.IgniteBiPredicate<K,V> p, @Nullable @Nullable Object... args) throws javax.cache.CacheException
      Specified by:
      localLoadCacheAsync in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      javax.cache.CacheException
    • getAndPutIfAbsent

      public V getAndPutIfAbsent(K key, V val) throws javax.cache.CacheException, org.apache.ignite.transactions.TransactionException
      Specified by:
      getAndPutIfAbsent in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      javax.cache.CacheException
      org.apache.ignite.transactions.TransactionException
    • lock

      public Lock lock(K key)
      Specified by:
      lock in interface org.apache.ignite.IgniteCache<K,V>
    • lockAll

      public Lock lockAll(Collection<? extends K> keys)
      Specified by:
      lockAll in interface org.apache.ignite.IgniteCache<K,V>
    • isLocalLocked

      public boolean isLocalLocked(K key, boolean byCurrThread)
      Specified by:
      isLocalLocked in interface org.apache.ignite.IgniteCache<K,V>
    • localEntries

      public Iterable<javax.cache.Cache.Entry<K,V>> localEntries(org.apache.ignite.cache.CachePeekMode... peekModes) throws javax.cache.CacheException
      Specified by:
      localEntries in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      javax.cache.CacheException
    • queryMetrics

      public org.apache.ignite.cache.query.QueryMetrics queryMetrics()
      Specified by:
      queryMetrics in interface org.apache.ignite.IgniteCache<K,V>
    • resetQueryMetrics

      public void resetQueryMetrics()
      Specified by:
      resetQueryMetrics in interface org.apache.ignite.IgniteCache<K,V>
    • queryDetailMetrics

      public Collection<? extends org.apache.ignite.cache.query.QueryDetailMetrics> queryDetailMetrics()
      Specified by:
      queryDetailMetrics in interface org.apache.ignite.IgniteCache<K,V>
    • resetQueryDetailMetrics

      public void resetQueryDetailMetrics()
      Specified by:
      resetQueryDetailMetrics in interface org.apache.ignite.IgniteCache<K,V>
    • localEvict

      public void localEvict(Collection<? extends K> keys)
      Specified by:
      localEvict in interface org.apache.ignite.IgniteCache<K,V>
    • localPeek

      public V localPeek(K key, org.apache.ignite.cache.CachePeekMode... peekModes)
      Specified by:
      localPeek in interface org.apache.ignite.IgniteCache<K,V>
    • size

      public int size(org.apache.ignite.cache.CachePeekMode... peekModes) throws javax.cache.CacheException
      Specified by:
      size in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      javax.cache.CacheException
    • sizeAsync

      public org.apache.ignite.lang.IgniteFuture<Integer> sizeAsync(org.apache.ignite.cache.CachePeekMode... peekModes) throws javax.cache.CacheException
      Specified by:
      sizeAsync in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      javax.cache.CacheException
    • sizeLong

      public long sizeLong(org.apache.ignite.cache.CachePeekMode... peekModes) throws javax.cache.CacheException
      Specified by:
      sizeLong in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      javax.cache.CacheException
    • sizeLong

      public long sizeLong(int partition, org.apache.ignite.cache.CachePeekMode... peekModes) throws javax.cache.CacheException
      Specified by:
      sizeLong in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      javax.cache.CacheException
    • sizeLongAsync

      public org.apache.ignite.lang.IgniteFuture<Long> sizeLongAsync(int partition, org.apache.ignite.cache.CachePeekMode... peekModes) throws javax.cache.CacheException
      Specified by:
      sizeLongAsync in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      javax.cache.CacheException
    • localSize

      public int localSize(org.apache.ignite.cache.CachePeekMode... peekModes)
      Specified by:
      localSize in interface org.apache.ignite.IgniteCache<K,V>
    • localSizeLong

      public long localSizeLong(org.apache.ignite.cache.CachePeekMode... peekModes)
      Specified by:
      localSizeLong in interface org.apache.ignite.IgniteCache<K,V>
    • localSizeLong

      public long localSizeLong(int partition, org.apache.ignite.cache.CachePeekMode... peekModes)
      Specified by:
      localSizeLong in interface org.apache.ignite.IgniteCache<K,V>
    • invokeAll

      public <T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Set<? extends K> keys, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args) throws org.apache.ignite.transactions.TransactionException
      Specified by:
      invokeAll in interface javax.cache.Cache<K,V>
      Specified by:
      invokeAll in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      org.apache.ignite.transactions.TransactionException
    • invokeAll

      public <T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,T>> map, Object... args) throws org.apache.ignite.transactions.TransactionException
      Specified by:
      invokeAll in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      org.apache.ignite.transactions.TransactionException
    • invokeAllAsync

      public <T> org.apache.ignite.lang.IgniteFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>> invokeAllAsync(Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,T>> map, Object... args) throws org.apache.ignite.transactions.TransactionException
      Specified by:
      invokeAllAsync in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      org.apache.ignite.transactions.TransactionException
    • getEntry

      public org.apache.ignite.cache.CacheEntry<K,V> getEntry(K key) throws org.apache.ignite.transactions.TransactionException
      Specified by:
      getEntry in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      org.apache.ignite.transactions.TransactionException
    • getEntryAsync

      public org.apache.ignite.lang.IgniteFuture<org.apache.ignite.cache.CacheEntry<K,V>> getEntryAsync(K key) throws org.apache.ignite.transactions.TransactionException
      Specified by:
      getEntryAsync in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      org.apache.ignite.transactions.TransactionException
    • getEntries

      public Collection<org.apache.ignite.cache.CacheEntry<K,V>> getEntries(Set<? extends K> keys) throws org.apache.ignite.transactions.TransactionException
      Specified by:
      getEntries in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      org.apache.ignite.transactions.TransactionException
    • getEntriesAsync

      public org.apache.ignite.lang.IgniteFuture<Collection<org.apache.ignite.cache.CacheEntry<K,V>>> getEntriesAsync(Set<? extends K> keys) throws org.apache.ignite.transactions.TransactionException
      Specified by:
      getEntriesAsync in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      org.apache.ignite.transactions.TransactionException
    • getAllOutTx

      public Map<K,V> getAllOutTx(Set<? extends K> keys)
      Specified by:
      getAllOutTx in interface org.apache.ignite.IgniteCache<K,V>
    • getAllOutTxAsync

      public org.apache.ignite.lang.IgniteFuture<Map<K,V>> getAllOutTxAsync(Set<? extends K> keys)
      Specified by:
      getAllOutTxAsync in interface org.apache.ignite.IgniteCache<K,V>
    • containsKeys

      public boolean containsKeys(Set<? extends K> keys) throws org.apache.ignite.transactions.TransactionException
      Specified by:
      containsKeys in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      org.apache.ignite.transactions.TransactionException
    • containsKeysAsync

      public org.apache.ignite.lang.IgniteFuture<Boolean> containsKeysAsync(Set<? extends K> keys) throws org.apache.ignite.transactions.TransactionException
      Specified by:
      containsKeysAsync in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      org.apache.ignite.transactions.TransactionException
    • clear

      public void clear(K key)
      Specified by:
      clear in interface org.apache.ignite.IgniteCache<K,V>
    • clearAll

      public void clearAll(Set<? extends K> keys)
      Specified by:
      clearAll in interface org.apache.ignite.IgniteCache<K,V>
    • localClear

      public void localClear(K key)
      Specified by:
      localClear in interface org.apache.ignite.IgniteCache<K,V>
    • localClearAll

      public void localClearAll(Set<? extends K> keys)
      Specified by:
      localClearAll in interface org.apache.ignite.IgniteCache<K,V>
    • invoke

      public <T> T invoke(K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... objects) throws javax.cache.processor.EntryProcessorException
      Specified by:
      invoke in interface javax.cache.Cache<K,V>
      Specified by:
      invoke in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      javax.cache.processor.EntryProcessorException
    • invoke

      public <T> T invoke(K key, org.apache.ignite.cache.CacheEntryProcessor<K,V,T> entryProcessor, Object... arguments) throws org.apache.ignite.transactions.TransactionException
      Specified by:
      invoke in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      org.apache.ignite.transactions.TransactionException
    • invokeAsync

      public <T> org.apache.ignite.lang.IgniteFuture<T> invokeAsync(K key, org.apache.ignite.cache.CacheEntryProcessor<K,V,T> entryProcessor, Object... arguments) throws org.apache.ignite.transactions.TransactionException
      Specified by:
      invokeAsync in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      org.apache.ignite.transactions.TransactionException
    • invokeAllAsync

      public <T> org.apache.ignite.lang.IgniteFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>> invokeAllAsync(Set<? extends K> keys, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args) throws org.apache.ignite.transactions.TransactionException
      Specified by:
      invokeAllAsync in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      org.apache.ignite.transactions.TransactionException
    • invokeAll

      public <T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Set<? extends K> keys, org.apache.ignite.cache.CacheEntryProcessor<K,V,T> entryProcessor, Object... args) throws org.apache.ignite.transactions.TransactionException
      Specified by:
      invokeAll in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      org.apache.ignite.transactions.TransactionException
    • invokeAllAsync

      public <T> org.apache.ignite.lang.IgniteFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>> invokeAllAsync(Set<? extends K> keys, org.apache.ignite.cache.CacheEntryProcessor<K,V,T> entryProcessor, Object... args) throws org.apache.ignite.transactions.TransactionException
      Specified by:
      invokeAllAsync in interface org.apache.ignite.IgniteCache<K,V>
      Throws:
      org.apache.ignite.transactions.TransactionException
    • rebalance

      public org.apache.ignite.lang.IgniteFuture<Boolean> rebalance()
      Specified by:
      rebalance in interface org.apache.ignite.IgniteCache<K,V>
    • indexReadyFuture

      public org.apache.ignite.lang.IgniteFuture<?> indexReadyFuture()
      Specified by:
      indexReadyFuture in interface org.apache.ignite.IgniteCache<K,V>
    • metrics

      public org.apache.ignite.cache.CacheMetrics metrics()
      Specified by:
      metrics in interface org.apache.ignite.IgniteCache<K,V>
    • metrics

      public org.apache.ignite.cache.CacheMetrics metrics(org.apache.ignite.cluster.ClusterGroup grp)
      Specified by:
      metrics in interface org.apache.ignite.IgniteCache<K,V>
    • localMetrics

      public org.apache.ignite.cache.CacheMetrics localMetrics()
      Specified by:
      localMetrics in interface org.apache.ignite.IgniteCache<K,V>
    • lostPartitions

      public Collection<Integer> lostPartitions()
      Specified by:
      lostPartitions in interface org.apache.ignite.IgniteCache<K,V>
    • enableStatistics

      public void enableStatistics(boolean enabled)
      Specified by:
      enableStatistics in interface org.apache.ignite.IgniteCache<K,V>
    • clearStatistics

      public void clearStatistics()
      Specified by:
      clearStatistics in interface org.apache.ignite.IgniteCache<K,V>
    • preloadPartition

      public void preloadPartition(int partition)
      Specified by:
      preloadPartition in interface org.apache.ignite.IgniteCache<K,V>
    • preloadPartitionAsync

      public org.apache.ignite.lang.IgniteFuture<Void> preloadPartitionAsync(int partition)
      Specified by:
      preloadPartitionAsync in interface org.apache.ignite.IgniteCache<K,V>
    • localPreloadPartition

      public boolean localPreloadPartition(int partition)
      Specified by:
      localPreloadPartition in interface org.apache.ignite.IgniteCache<K,V>
    • mxBean

      public org.apache.ignite.mxbean.CacheMetricsMXBean mxBean()
      Specified by:
      mxBean in interface org.apache.ignite.IgniteCache<K,V>
    • localMxBean

      public org.apache.ignite.mxbean.CacheMetricsMXBean localMxBean()
      Specified by:
      localMxBean in interface org.apache.ignite.IgniteCache<K,V>
    • localEntrySize

      public int localEntrySize(K k)
      Specified by:
      localEntrySize in interface org.apache.ignite.IgniteCache<K,V>
    • touch

      public boolean touch(K k)
      Specified by:
      touch in interface org.apache.ignite.IgniteCache<K,V>
    • touchAsync

      public org.apache.ignite.lang.IgniteFuture<Boolean> touchAsync(K key)
      Specified by:
      touchAsync in interface org.apache.ignite.IgniteCache<K,V>
    • query

      public <T, R> org.apache.ignite.cache.query.QueryCursor<R> query(org.apache.ignite.cache.query.Query<T> qry, org.apache.ignite.lang.IgniteClosure<T,R> transformer)
      Specified by:
      query in interface org.apache.ignite.IgniteCache<K,V>