All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.hotrod.impl.cache.RemoteCache Maven / Gradle / Ivy

The newest version!
package org.infinispan.hotrod.impl.cache;

import java.net.SocketAddress;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.Flow;

import jakarta.transaction.TransactionManager;

import org.infinispan.api.async.AsyncCacheEntryProcessor;
import org.infinispan.api.common.CacheEntry;
import org.infinispan.api.common.CacheEntryVersion;
import org.infinispan.api.common.CacheOptions;
import org.infinispan.api.common.CacheWriteOptions;
import org.infinispan.api.common.events.cache.CacheEntryEvent;
import org.infinispan.api.common.events.cache.CacheEntryEventType;
import org.infinispan.api.common.events.cache.CacheListenerOptions;
import org.infinispan.api.common.process.CacheEntryProcessorResult;
import org.infinispan.api.common.process.CacheProcessorOptions;
import org.infinispan.api.configuration.CacheConfiguration;
import org.infinispan.commons.util.CloseableIterator;
import org.infinispan.hotrod.impl.DataFormat;
import org.infinispan.hotrod.impl.HotRodTransport;
import org.infinispan.hotrod.impl.operations.CacheOperationsFactory;
import org.infinispan.hotrod.impl.operations.RetryAwareCompletionStage;
import org.reactivestreams.Publisher;

/**
 * @since 14.0
 **/
public interface RemoteCache extends AutoCloseable {
   CompletionStage configuration();

   HotRodTransport getHotRodTransport();

   CacheOperationsFactory getOperationsFactory();

   CompletionStage get(K key, CacheOptions options);

   K keyAsObjectIfNeeded(Object key);

   byte[] keyToBytes(Object o);

   byte[] valueToBytes(Object o);

   CompletionStage> getEntry(K key, CacheOptions options);

   RetryAwareCompletionStage> getEntry(K key, CacheOptions options, SocketAddress listenerAddress);

   CompletionStage> putIfAbsent(K key, V value, CacheWriteOptions options);

   CompletionStage setIfAbsent(K key, V value, CacheWriteOptions options);

   CompletionStage> put(K key, V value, CacheWriteOptions options);

   CompletionStage set(K key, V value, CacheWriteOptions options);

   CompletionStage replace(K key, V value, CacheEntryVersion version, CacheWriteOptions options);

   CompletionStage> getOrReplaceEntry(K key, V value, CacheEntryVersion version, CacheWriteOptions options);

   CompletionStage remove(K key, CacheOptions options);

   CompletionStage remove(K key, CacheEntryVersion version, CacheOptions options);

   CompletionStage> getAndRemove(K key, CacheOptions options);

   Flow.Publisher keys(CacheOptions options);

   Flow.Publisher> entries(CacheOptions options);

   CompletionStage putAll(Map entries, CacheWriteOptions options);

   CompletionStage putAll(Flow.Publisher> entries, CacheWriteOptions options);

   Flow.Publisher> getAll(Set keys, CacheOptions options);

   Flow.Publisher> getAll(CacheOptions options, K[] keys);

   Flow.Publisher removeAll(Set keys, CacheWriteOptions options);

   Flow.Publisher removeAll(Flow.Publisher keys, CacheWriteOptions options);

   Flow.Publisher> getAndRemoveAll(Set keys, CacheWriteOptions options);

   Flow.Publisher> getAndRemoveAll(Flow.Publisher keys, CacheWriteOptions options);

   CompletionStage estimateSize(CacheOptions options);

   CompletionStage clear(CacheOptions options);

   Flow.Publisher> listen(CacheListenerOptions options, CacheEntryEventType[] types);

    Flow.Publisher> process(Set keys, AsyncCacheEntryProcessor task, CacheOptions options);

    Flow.Publisher> processAll(AsyncCacheEntryProcessor processor, CacheProcessorOptions options);

   default CloseableIterator> retrieveEntries(String filterConverterFactory, Set segments, int batchSize) {
      return retrieveEntries(filterConverterFactory, null, segments, batchSize);
   }

   CloseableIterator> retrieveEntries(String filterConverterFactory, Object[] filterConverterParams, Set segments, int batchSize);

    RemoteCache withDataFormat(DataFormat newDataFormat);

   void resolveStorage(boolean objectStorage);

   CompletionStage updateBloomFilter();

   SocketAddress addNearCacheListener(Object listener, int bloomFilterBits);

   String getName();

   DataFormat getDataFormat();

    Publisher> publishEntries(String filterConverterFactory, Object[] filterConverterParams, Set segments, int batchSize);

   CloseableIterator> retrieveEntriesByQuery(RemoteQuery query, Set segments, int batchSize);

    Publisher> publishEntriesByQuery(RemoteQuery query, Set segments, int batchSize);

   CloseableIterator> retrieveEntriesWithMetadata(Set segments, int batchSize);

   Publisher> publishEntriesWithMetadata(Set segments, int batchSize);

   TransactionManager getTransactionManager();

   boolean isTransactional();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy