Class RestConnection
- java.lang.Object
-
- org.infinispan.cli.connection.rest.RestConnection
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Connection
public class RestConnection extends Object implements Connection, Closeable
- Since:
- 10.0
- Author:
- Tristan Tarrant <tristan@infinispan.org>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.cli.connection.Connection
Connection.ResponseMode
-
-
Constructor Summary
Constructors Constructor Description RestConnection(org.infinispan.client.rest.configuration.RestClientConfigurationBuilder builder)
-
Method Summary
-
-
-
Method Detail
-
getURI
public String getURI()
- Specified by:
getURIin interfaceConnection
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
connect
public void connect() throws IOException- Specified by:
connectin interfaceConnection- Throws:
IOException
-
connect
public void connect(String username, String password) throws IOException
- Specified by:
connectin interfaceConnection- Throws:
IOException
-
getEncoding
public org.infinispan.commons.dataconversion.MediaType getEncoding()
- Specified by:
getEncodingin interfaceConnection
-
setEncoding
public void setEncoding(org.infinispan.commons.dataconversion.MediaType encoding)
- Specified by:
setEncodingin interfaceConnection
-
execute
public String execute(BiFunction<org.infinispan.client.rest.RestClient,Resource,CompletionStage<org.infinispan.client.rest.RestResponse>> op, Connection.ResponseMode responseMode) throws IOException
- Specified by:
executein interfaceConnection- Throws:
IOException
-
getActiveResource
public Resource getActiveResource()
- Specified by:
getActiveResourcein interfaceConnection
-
setActiveResource
public void setActiveResource(Resource resource)
- Specified by:
setActiveResourcein interfaceConnection
-
getActiveContainer
public ContainerResource getActiveContainer()
- Specified by:
getActiveContainerin interfaceConnection
-
getAvailableCaches
public Collection<String> getAvailableCaches(String container)
- Specified by:
getAvailableCachesin interfaceConnection
-
getAvailableContainers
public Collection<String> getAvailableContainers()
- Specified by:
getAvailableContainersin interfaceConnection
-
getAvailableCounters
public Collection<String> getAvailableCounters(String container) throws IOException
- Specified by:
getAvailableCountersin interfaceConnection- Throws:
IOException
-
getAvailableCacheConfigurations
public Collection<String> getAvailableCacheConfigurations(String container)
- Specified by:
getAvailableCacheConfigurationsin interfaceConnection
-
getAvailableSchemas
public Collection<String> getAvailableSchemas(String container) throws IOException
- Specified by:
getAvailableSchemasin interfaceConnection- Throws:
IOException
-
getAvailableServers
public Collection<String> getAvailableServers(String container) throws IOException
- Specified by:
getAvailableServersin interfaceConnection- Throws:
IOException
-
getAvailableTasks
public Collection<String> getAvailableTasks(String container) throws IOException
- Specified by:
getAvailableTasksin interfaceConnection- Throws:
IOException
-
getAvailableSites
public Collection<String> getAvailableSites(String container, String cache) throws IOException
- Specified by:
getAvailableSitesin interfaceConnection- Throws:
IOException
-
getCacheKeys
public Iterable<Map<String,String>> getCacheKeys(String container, String cache) throws IOException
- Specified by:
getCacheKeysin interfaceConnection- Throws:
IOException
-
getCacheKeys
public Iterable<Map<String,String>> getCacheKeys(String container, String cache, int limit) throws IOException
- Specified by:
getCacheKeysin interfaceConnection- Throws:
IOException
-
getCacheEntries
public Iterable<Map<String,String>> getCacheEntries(String container, String cache, int limit, boolean metadata) throws IOException
- Specified by:
getCacheEntriesin interfaceConnection- Throws:
IOException
-
getCounterValue
public Iterable<String> getCounterValue(String container, String counter) throws IOException
- Specified by:
getCounterValuein interfaceConnection- Throws:
IOException
-
getRoles
public Collection<String> getRoles() throws IOException
- Specified by:
getRolesin interfaceConnection- Throws:
IOException
-
isConnected
public boolean isConnected()
- Specified by:
isConnectedin interfaceConnection
-
describeContainer
public String describeContainer(String container) throws IOException
- Specified by:
describeContainerin interfaceConnection- Throws:
IOException
-
describeCache
public String describeCache(String container, String cache) throws IOException
- Specified by:
describeCachein interfaceConnection- Throws:
IOException
-
describeKey
public String describeKey(String container, String cache, String key) throws IOException
- Specified by:
describeKeyin interfaceConnection- Throws:
IOException
-
describeConfiguration
public String describeConfiguration(String container, String counter)
- Specified by:
describeConfigurationin interfaceConnection
-
describeCounter
public String describeCounter(String container, String counter) throws IOException
- Specified by:
describeCounterin interfaceConnection- Throws:
IOException
-
describeTask
public String describeTask(String container, String taskName) throws IOException
- Specified by:
describeTaskin interfaceConnection- Throws:
IOException
-
getAvailableLogAppenders
public Collection<String> getAvailableLogAppenders() throws IOException
- Specified by:
getAvailableLogAppendersin interfaceConnection- Throws:
IOException
-
getAvailableLoggers
public Collection<String> getAvailableLoggers() throws IOException
- Specified by:
getAvailableLoggersin interfaceConnection- Throws:
IOException
-
getClusterNodes
public Collection<String> getClusterNodes()
- Specified by:
getClusterNodesin interfaceConnection
-
getConnectionInfo
public String getConnectionInfo()
- Specified by:
getConnectionInfoin interfaceConnection
-
getServerVersion
public String getServerVersion()
- Specified by:
getServerVersionin interfaceConnection
-
getBackupNames
public Collection<String> getBackupNames(String container) throws IOException
- Specified by:
getBackupNamesin interfaceConnection- Throws:
IOException
-
getSitesView
public Collection<String> getSitesView()
- Specified by:
getSitesViewin interfaceConnection
-
getLocalSiteName
public String getLocalSiteName()
- Specified by:
getLocalSiteNamein interfaceConnection
-
isRelayNode
public boolean isRelayNode()
- Specified by:
isRelayNodein interfaceConnection
-
getRelayNodes
public Collection<String> getRelayNodes()
- Specified by:
getRelayNodesin interfaceConnection
-
getConnectorNames
public Collection<String> getConnectorNames() throws IOException
- Specified by:
getConnectorNamesin interfaceConnection- Throws:
IOException
-
getDataSourceNames
public Collection<String> getDataSourceNames() throws IOException
- Specified by:
getDataSourceNamesin interfaceConnection- Throws:
IOException
-
getCacheConfigurationAttributes
public Collection<String> getCacheConfigurationAttributes(String name)
- Specified by:
getCacheConfigurationAttributesin interfaceConnection
-
refreshServerInfo
public void refreshServerInfo() throws IOException- Specified by:
refreshServerInfoin interfaceConnection- Throws:
IOException
-
getUsername
public String getUsername()
- Specified by:
getUsernamein interfaceConnection
-
-