org.infinispan.commands.RemoveCacheCommand Maven / Gradle / Ivy
package org.infinispan.commands;
import static org.infinispan.factories.KnownComponentNames.CACHE_DEPENDENCY_GRAPH;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.concurrent.CompletableFuture;
import org.infinispan.Cache;
import org.infinispan.commands.remote.BaseRpcCommand;
import org.infinispan.configuration.ConfigurationManager;
import org.infinispan.eviction.PassivationManager;
import org.infinispan.factories.ComponentRegistry;
import org.infinispan.factories.GlobalComponentRegistry;
import org.infinispan.jmx.CacheJmxRegistration;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.persistence.manager.PersistenceManager;
import org.infinispan.util.ByteString;
import org.infinispan.util.DependencyGraph;
import org.infinispan.util.concurrent.CompletableFutures;
/**
* Command to stop a cache and remove all its contents from both
* memory and any backing store.
*
* @author Galder Zamarreño
* @since 5.0
*/
public class RemoveCacheCommand extends BaseRpcCommand {
public static final byte COMMAND_ID = 18;
private EmbeddedCacheManager cacheManager;
private RemoveCacheCommand() {
super(null); // For command id uniqueness test
}
public RemoveCacheCommand(ByteString cacheName, EmbeddedCacheManager cacheManager) {
super(cacheName);
this.cacheManager = cacheManager;
}
@Override
public CompletableFuture
© 2015 - 2025 Weber Informatics LLC | Privacy Policy