Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package org.infinispan.persistence.remote;
import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
import org.infinispan.client.hotrod.Flag;
import org.infinispan.client.hotrod.MetadataValue;
import org.infinispan.client.hotrod.RemoteCache;
import org.infinispan.client.hotrod.RemoteCacheManager;
import org.infinispan.client.hotrod.configuration.ConfigurationBuilder;
import org.infinispan.client.hotrod.configuration.ExhaustedAction;
import org.infinispan.client.hotrod.impl.ConfigurationProperties;
import org.infinispan.commons.api.BasicCacheContainer;
import org.infinispan.commons.configuration.ConfiguredBy;
import org.infinispan.commons.marshall.Marshaller;
import org.infinispan.commons.marshall.jboss.GenericJBossMarshaller;
import org.infinispan.commons.util.Util;
import org.infinispan.container.InternalEntryFactory;
import org.infinispan.container.versioning.NumericVersion;
import org.infinispan.filter.KeyFilter;
import org.infinispan.marshall.core.MarshalledEntry;
import org.infinispan.metadata.EmbeddedMetadata;
import org.infinispan.metadata.InternalMetadata;
import org.infinispan.metadata.Metadata;
import org.infinispan.metadata.impl.InternalMetadataImpl;
import org.infinispan.persistence.TaskContextImpl;
import org.infinispan.persistence.remote.configuration.ConnectionPoolConfiguration;
import org.infinispan.persistence.remote.configuration.RemoteServerConfiguration;
import org.infinispan.persistence.remote.configuration.RemoteStoreConfiguration;
import org.infinispan.persistence.remote.logging.Log;
import org.infinispan.persistence.remote.wrapper.HotRodEntryMarshaller;
import org.infinispan.persistence.spi.AdvancedLoadWriteStore;
import org.infinispan.persistence.spi.FlagAffectedStore;
import org.infinispan.persistence.spi.InitializationContext;
import org.infinispan.persistence.spi.PersistenceException;
import org.infinispan.util.logging.LogFactory;
import net.jcip.annotations.ThreadSafe;
/**
* Cache store that delegates the call to a infinispan cluster. Communication between this cache store and the remote
* cluster is achieved through the java HotRod client: this assures fault tolerance and smart dispatching of calls to
* the nodes that have the highest chance of containing the given key. This cache store supports both preloading
* and fetchPersistentState.
*
* Purging elements is not possible, as HotRod does not support the fetching of all remote keys (this would be a
* very costly operation as well). Purging takes place at the remote end (infinispan cluster).
*
* @author [email protected]
* @see org.infinispan.persistence.remote.configuration.RemoteStoreConfiguration
* @see Hotrod Java Client
* @since 4.1
*/
@ThreadSafe
@ConfiguredBy(RemoteStoreConfiguration.class)
public class RemoteStore implements AdvancedLoadWriteStore, FlagAffectedStore {
private static final Log log = LogFactory.getLog(RemoteStore.class, Log.class);
private static final boolean trace = log.isTraceEnabled();
private RemoteStoreConfiguration configuration;
private volatile RemoteCacheManager remoteCacheManager;
private volatile RemoteCache