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

org.infinispan.cli.connection.Connection Maven / Gradle / Ivy

package org.infinispan.cli.connection;

import java.io.Closeable;
import java.io.IOException;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.CompletionStage;
import java.util.function.BiFunction;

import org.infinispan.cli.resources.Resource;
import org.infinispan.client.rest.RestClient;
import org.infinispan.client.rest.RestResponse;
import org.infinispan.commons.dataconversion.MediaType;

public interface Connection extends Closeable {

   void connect() throws IOException;

   void connect(String username, String password) throws IOException;

   String getURI();

   String execute(BiFunction> op, ResponseMode responseMode) throws IOException;

   Resource getActiveResource();

   void setActiveResource(Resource resource);

   Resource getActiveContainer();

   Collection getAvailableCaches(String container);

   Collection getAvailableContainers();

   Collection getAvailableCounters(String container) throws IOException;

   Collection getAvailableCacheConfigurations(String container);

   Collection getAvailableSchemas(String container) throws IOException;

   Collection getAvailableServers(String container) throws IOException;

   Collection getAvailableSites(String container, String cache) throws IOException;

   Collection getAvailableTasks(String container) throws IOException;

   Iterable> getCacheKeys(String container, String cache) throws IOException;

   Iterable> getCacheKeys(String container, String cache, int limit) throws IOException;

   Iterable> getCacheEntries(String container, String cache, int limit, boolean metadata) throws IOException;

   Iterable getCounterValue(String container, String counter) throws IOException;

   boolean isConnected();

   String describeContainer(String container) throws IOException;

   String describeCache(String container, String cache) throws IOException;

   String describeKey(String container, String cache, String key) throws IOException;

   String describeConfiguration(String container, String configuration) throws IOException;

   String describeCounter(String container, String counter) throws IOException;

   String describeTask(String container, String taskName) throws IOException;

   String getConnectionInfo();

   String getServerVersion();

   Collection getClusterNodes();

   Collection getAvailableLogAppenders() throws IOException;

   Collection getAvailableLoggers() throws IOException;

   Collection getBackupNames(String container) throws IOException;

   Collection getSitesView();

   String getLocalSiteName();

   boolean isRelayNode();

   Collection getRelayNodes();

   Collection getConnectorNames() throws IOException;

   MediaType getEncoding();

   void setEncoding(MediaType encoding);

   void refreshServerInfo() throws IOException;

   Collection getDataSourceNames() throws IOException;

   Collection getCacheConfigurationAttributes(String name);

   String getUsername();

   Collection getRoles() throws IOException;

   enum ResponseMode {QUIET, BODY, FILE, HEADERS}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy