Class RestCacheClientOkHttp
java.lang.Object
org.infinispan.client.rest.impl.okhttp.RestCacheClientOkHttp
- All Implemented Interfaces:
RestCacheClient
- Since:
- 10.0
- Author:
- Tristan Tarrant <tristan@infinispan.org>
-
Method Summary
Modifier and TypeMethodDescriptionbackupStatus(String site) bringSiteOnline(String site) Bring back a backup site onlinecancelPushState(String site) Cancels the state pushcancelReceiveState(String site) Cancel the receiving state on a backup siteclear()Clears a cacheDeletes all the indexes from the cache.Clear the status of a state push in a siteClear runtime query statistics.Clear search stats.configuration(String mediaType) Retrieves the cache configuration with a specific MediaType or list of MediaTypes.Retrieves all available configuration attributes for this cacheconfigurationAttributes(boolean full) Retrieves all available configuration attributes for this cache optionally including values and typesconnectSource(RestEntity value) Connects the target cluster to a source cluster before a Rolling UpgradecreateWithConfiguration(RestEntity configuration, org.infinispan.commons.api.CacheContainerAdmin.AdminFlag... flags) Creates the cache using the supplied configurationcreateWithTemplate(String template, org.infinispan.commons.api.CacheContainerAdmin.AdminFlag... flags) Creates the cache using the supplied template namedelete()Removes the cachedetails()Obtains details about the cacheDisables automatic rebalancing for the cache.Disconnects the target cluster from the source cluster after a Rolling UpgradeObtain metrics about the distribution of data of the cache.Enables automatic rebalancing for the cache.entries()Retrieves entries without metadataentries(boolean contentNegotiation) Retrieves entries without metadataentries(int limit) Retrieves entries limited by countentries(int limit, boolean metadata) Retrieves entries with limit and metadataexists()Check if the cache existsGETs a key from the cacheGETs a key from the cache with a specific MediaType or list of MediaTypes.Same asRestCacheClient.get(String, String)but with an option to return extended headers.Same asRestCacheClient.get(String)but allowing custom headers.Retrieves the Cache's Availability status.Get the configuration used to automatically take a backup site offlineSimilar toRestCacheClient.get(String)but only retrieves headersSimilar toRestCacheClient.head(String)but allowing custom headersObtains the index metamodel for the current cache.Obtain statistics about the indexes.keys()Retrieve all keyskeys(int limit) Retrieve keys limited by countRetrieves all keys from the cache with a specific MediaType or list of MediaTypes.markTopologyStable(boolean force) Force the current cache topology as the stable if not running.name()Returns the name of the cachePOSTs a key/value to the cache as text/plainPOSTs a key/value to the cache as text/plain with the specified expirationpost(String key, RestEntity value) POSTs a key/value to the cache with the specified encodingpost(String key, RestEntity value, long ttl, long maxIdle) POSTs a key/value to the cache with the specified encoding and expirationpushSiteState(String site) Starts the state push to a backup siteObtain the status of a state push to a backup sitePUTs a key/value to the cache as text/plainPUTs a key/value to the cache as text/plain with the specified expirationput(String key, String keyContentType, RestEntity value) PUT a key/value to the cache with custom media types for keys and valuesput(String key, String keyContentType, RestEntity value, long ttl, long maxIdle) PUT an entry with metadata.Same asRestCacheClient.put(String, String, RestEntity)but allowing custom headers.put(String key, RestEntity value) PUTs a key/value to the cache with the specified encodingput(String key, RestEntity value, long ttl, long maxIdle) PUTs a key/value to the cache with the specified encoding and expirationput(String key, RestEntity value, String... flags) Same asRestCacheClient.put(String, RestEntity)also allowing one or moreto be passed.invalid reference
org.infinispan.context.FlagExecutes an Ickle-queryExecutes an Ickle-queryExecutes an Ickle-queryObtain statistics about queries.reindex()Rebuild the search indexes of the cache based on its data.Same asRestCacheClient.reindex()but only considers data from the local cluster member.DELETEs an entry from the cacheSame asRestCacheClient.remove(String)but allowing custom headersObtain query and indexing statistics for the cache.setAvailability(String availability) Sets the Cache's Avaialabilitysize()Obtains the total number of elements in the cacheChecks if the cache is connected through a remote store to perform rolling upgradesReturn the remote store configuration in case the case has been connected to another cluster usingRestCacheClient.connectSource(RestEntity)stats()Obtains statistics for the cacheExecute a Rolling Upgrade processing using defaults.synchronizeData(Integer readBatch, Integer threads) Execute a Rolling Upgrade processingtakeSiteOffline(String site) Take a backup site offlineupdateConfigurationAttribute(String attribute, String value) Updates a configuration attribute.Update index schema for the current cache.updateWithConfiguration(RestEntity configuration, org.infinispan.commons.api.CacheContainerAdmin.AdminFlag... flags) Updates the cache configurationupdateXSiteTakeOfflineConfig(String site, int afterFailures, long minTimeToWait) Updates the configuration used to automatically take a backup site offlinexSiteStateTransferMode(String site) Returns the cross-site replication state transfer mode.xSiteStateTransferMode(String site, org.infinispan.configuration.cache.XSiteStateTransferMode mode) Sets the cross-site replication state transfer mode.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.client.rest.RestCacheClient
configuration, query
-
Method Details
-
name
Description copied from interface:RestCacheClientReturns the name of the cache- Specified by:
namein interfaceRestCacheClient
-
clear
Description copied from interface:RestCacheClientClears a cache- Specified by:
clearin interfaceRestCacheClient
-
exists
Description copied from interface:RestCacheClientCheck if the cache exists- Specified by:
existsin interfaceRestCacheClient
-
synchronizeData
Description copied from interface:RestCacheClientExecute a Rolling Upgrade processing- Specified by:
synchronizeDatain interfaceRestCacheClient
-
synchronizeData
Description copied from interface:RestCacheClientExecute a Rolling Upgrade processing using defaults.- Specified by:
synchronizeDatain interfaceRestCacheClient
-
disconnectSource
Description copied from interface:RestCacheClientDisconnects the target cluster from the source cluster after a Rolling Upgrade- Specified by:
disconnectSourcein interfaceRestCacheClient
-
connectSource
Description copied from interface:RestCacheClientConnects the target cluster to a source cluster before a Rolling Upgrade- Specified by:
connectSourcein interfaceRestCacheClient- Parameters:
value- The remote-store config as JSON
-
sourceConnected
Description copied from interface:RestCacheClientChecks if the cache is connected through a remote store to perform rolling upgrades- Specified by:
sourceConnectedin interfaceRestCacheClient
-
sourceConnection
Description copied from interface:RestCacheClientReturn the remote store configuration in case the case has been connected to another cluster usingRestCacheClient.connectSource(RestEntity)- Specified by:
sourceConnectionin interfaceRestCacheClient
-
size
Description copied from interface:RestCacheClientObtains the total number of elements in the cache- Specified by:
sizein interfaceRestCacheClient
-
post
Description copied from interface:RestCacheClientPOSTs a key/value to the cache as text/plain- Specified by:
postin interfaceRestCacheClient- Parameters:
key-value-- Returns:
-
post
Description copied from interface:RestCacheClientPOSTs a key/value to the cache with the specified encoding- Specified by:
postin interfaceRestCacheClient- Parameters:
key-value-- Returns:
-
post
Description copied from interface:RestCacheClientPOSTs a key/value to the cache as text/plain with the specified expiration- Specified by:
postin interfaceRestCacheClient- Parameters:
key-value-ttl-maxIdle-- Returns:
-
post
Description copied from interface:RestCacheClientPOSTs a key/value to the cache with the specified encoding and expiration- Specified by:
postin interfaceRestCacheClient- Parameters:
key-value-ttl-maxIdle-- Returns:
-
put
Description copied from interface:RestCacheClientPUTs a key/value to the cache as text/plain- Specified by:
putin interfaceRestCacheClient- Parameters:
key-value-- Returns:
-
put
Description copied from interface:RestCacheClientPUT a key/value to the cache with custom media types for keys and values- Specified by:
putin interfaceRestCacheClient
-
put
public CompletionStage<RestResponse> put(String key, String keyContentType, RestEntity value, Map<String, String> headers) Description copied from interface:RestCacheClientSame asRestCacheClient.put(String, String, RestEntity)but allowing custom headers.- Specified by:
putin interfaceRestCacheClient
-
put
public CompletionStage<RestResponse> put(String key, String keyContentType, RestEntity value, long ttl, long maxIdle) Description copied from interface:RestCacheClientPUT an entry with metadata.- Specified by:
putin interfaceRestCacheClient- Parameters:
key- The keykeyContentType- TheMediaTypeof the keyvalue- aRestEntitycontaining the value and its MediaTypettl- The time to live valuemaxIdle- The max idle value- Returns:
-
put
Description copied from interface:RestCacheClientSame asRestCacheClient.put(String, RestEntity)also allowing one or moreto be passed.invalid reference
org.infinispan.context.Flag- Specified by:
putin interfaceRestCacheClient
-
put
Description copied from interface:RestCacheClientPUTs a key/value to the cache with the specified encoding- Specified by:
putin interfaceRestCacheClient- Parameters:
key-value-- Returns:
-
put
Description copied from interface:RestCacheClientPUTs a key/value to the cache as text/plain with the specified expiration- Specified by:
putin interfaceRestCacheClient- Parameters:
key-value-ttl-maxIdle-- Returns:
-
put
Description copied from interface:RestCacheClientPUTs a key/value to the cache with the specified encoding and expiration- Specified by:
putin interfaceRestCacheClient- Parameters:
key-value-ttl-maxIdle-- Returns:
-
get
Description copied from interface:RestCacheClientGETs a key from the cache- Specified by:
getin interfaceRestCacheClient- Parameters:
key-- Returns:
-
get
Description copied from interface:RestCacheClientSame asRestCacheClient.get(String)but allowing custom headers.- Specified by:
getin interfaceRestCacheClient
-
get
Description copied from interface:RestCacheClientGETs a key from the cache with a specific MediaType or list of MediaTypes.- Specified by:
getin interfaceRestCacheClient
-
get
Description copied from interface:RestCacheClientSame asRestCacheClient.get(String, String)but with an option to return extended headers.- Specified by:
getin interfaceRestCacheClient
-
head
Description copied from interface:RestCacheClientSimilar toRestCacheClient.get(String)but only retrieves headers- Specified by:
headin interfaceRestCacheClient- Parameters:
key-- Returns:
-
head
Description copied from interface:RestCacheClientSimilar toRestCacheClient.head(String)but allowing custom headers- Specified by:
headin interfaceRestCacheClient
-
remove
Description copied from interface:RestCacheClientDELETEs an entry from the cache- Specified by:
removein interfaceRestCacheClient- Parameters:
key-- Returns:
-
remove
Description copied from interface:RestCacheClientSame asRestCacheClient.remove(String)but allowing custom headers- Specified by:
removein interfaceRestCacheClient
-
createWithTemplate
public CompletionStage<RestResponse> createWithTemplate(String template, org.infinispan.commons.api.CacheContainerAdmin.AdminFlag... flags) Description copied from interface:RestCacheClientCreates the cache using the supplied template name- Specified by:
createWithTemplatein interfaceRestCacheClient- Parameters:
template- the name of a templateflags- any flags to apply to the create operation, e.g.CacheContainerAdmin.AdminFlag.VOLATILE- Returns:
-
createWithConfiguration
public CompletionStage<RestResponse> createWithConfiguration(RestEntity configuration, org.infinispan.commons.api.CacheContainerAdmin.AdminFlag... flags) Description copied from interface:RestCacheClientCreates the cache using the supplied configuration- Specified by:
createWithConfigurationin interfaceRestCacheClient- Parameters:
configuration- the configuration, in XML, JSON or YAML formatflags- any flags to apply to the create operation, e.g.CacheContainerAdmin.AdminFlag.VOLATILE- Returns:
-
delete
Description copied from interface:RestCacheClientRemoves the cache- Specified by:
deletein interfaceRestCacheClient- Returns:
-
keys
Description copied from interface:RestCacheClientRetrieve all keys- Specified by:
keysin interfaceRestCacheClient- Returns:
- Response with inputStream to get all the keys
-
keys
Description copied from interface:RestCacheClientRetrieve keys limited by count- Specified by:
keysin interfaceRestCacheClient- Parameters:
limit- The maximum number of keys to retrieve- Returns:
- Response with InputStream to get the keys
-
entries
Description copied from interface:RestCacheClientRetrieves entries without metadata- Specified by:
entriesin interfaceRestCacheClient- Returns:
- Response with InputStream to get the entries
-
entries
Description copied from interface:RestCacheClientRetrieves entries without metadata- Specified by:
entriesin interfaceRestCacheClient- Parameters:
contentNegotiation- if true, the server will convert keys and values to a readable format and return headers with the negotiated media type.- Returns:
- Response with InputStream to get the entries
-
entries
Description copied from interface:RestCacheClientRetrieves entries limited by count- Specified by:
entriesin interfaceRestCacheClient- Parameters:
limit- : The maximum number of entries to retrieve, or -1 to retrieve all
-
entries
Description copied from interface:RestCacheClientRetrieves entries with limit and metadata- Specified by:
entriesin interfaceRestCacheClient- Parameters:
limit- : The maximum number of entries to retrieve, or -1 to retrieve allmetadata- : if true, includes the metadata for each entry
-
keys
Description copied from interface:RestCacheClientRetrieves all keys from the cache with a specific MediaType or list of MediaTypes.- Specified by:
keysin interfaceRestCacheClient
-
configuration
Description copied from interface:RestCacheClientRetrieves the cache configuration with a specific MediaType or list of MediaTypes.- Specified by:
configurationin interfaceRestCacheClient
-
stats
Description copied from interface:RestCacheClientObtains statistics for the cache- Specified by:
statsin interfaceRestCacheClient- Returns:
-
distribution
Description copied from interface:RestCacheClientObtain metrics about the distribution of data of the cache.- Specified by:
distributionin interfaceRestCacheClient- Returns:
-
query
Description copied from interface:RestCacheClientExecutes an Ickle-query- Specified by:
queryin interfaceRestCacheClient- Parameters:
query- the ickle querylocal- if true, query is restricted to the data present in the node that process the request.
-
query
Description copied from interface:RestCacheClientExecutes an Ickle-query- Specified by:
queryin interfaceRestCacheClient- Parameters:
query- the ickle querymaxResults- the maximum number of results to returnoffset- the offset within the result from which to return results
-
query
public CompletionStage<RestResponse> query(String query, int maxResults, int offset, int hitCountAccuracy) Description copied from interface:RestCacheClientExecutes an Ickle-query- Specified by:
queryin interfaceRestCacheClient- Parameters:
query- the ickle querymaxResults- the maximum number of results to returnoffset- the offset within the result from which to return resultshitCountAccuracy- the limit to the hit count accuracy to return sooner
-
xsiteBackups
- Specified by:
xsiteBackupsin interfaceRestCacheClient- Returns:
- the status of all backup sites
-
backupStatus
- Specified by:
backupStatusin interfaceRestCacheClient- Returns:
- the status of a single backup site
-
takeSiteOffline
Description copied from interface:RestCacheClientTake a backup site offline- Specified by:
takeSiteOfflinein interfaceRestCacheClient
-
bringSiteOnline
Description copied from interface:RestCacheClientBring back a backup site online- Specified by:
bringSiteOnlinein interfaceRestCacheClient
-
pushSiteState
Description copied from interface:RestCacheClientStarts the state push to a backup site- Specified by:
pushSiteStatein interfaceRestCacheClient
-
cancelPushState
Description copied from interface:RestCacheClientCancels the state push- Specified by:
cancelPushStatein interfaceRestCacheClient
-
cancelReceiveState
Description copied from interface:RestCacheClientCancel the receiving state on a backup site- Specified by:
cancelReceiveStatein interfaceRestCacheClient
-
pushStateStatus
Description copied from interface:RestCacheClientObtain the status of a state push to a backup site- Specified by:
pushStateStatusin interfaceRestCacheClient
-
clearPushStateStatus
Description copied from interface:RestCacheClientClear the status of a state push in a site- Specified by:
clearPushStateStatusin interfaceRestCacheClient
-
getXSiteTakeOfflineConfig
Description copied from interface:RestCacheClientGet the configuration used to automatically take a backup site offline- Specified by:
getXSiteTakeOfflineConfigin interfaceRestCacheClient
-
updateXSiteTakeOfflineConfig
public CompletionStage<RestResponse> updateXSiteTakeOfflineConfig(String site, int afterFailures, long minTimeToWait) Description copied from interface:RestCacheClientUpdates the configuration used to automatically take a backup site offline- Specified by:
updateXSiteTakeOfflineConfigin interfaceRestCacheClient
-
xSiteStateTransferMode
Description copied from interface:RestCacheClientReturns the cross-site replication state transfer mode.- Specified by:
xSiteStateTransferModein interfaceRestCacheClient- See Also:
-
xSiteStateTransferMode
public CompletionStage<RestResponse> xSiteStateTransferMode(String site, org.infinispan.configuration.cache.XSiteStateTransferMode mode) Description copied from interface:RestCacheClientSets the cross-site replication state transfer mode.- Specified by:
xSiteStateTransferModein interfaceRestCacheClient- See Also:
-
reindex
Description copied from interface:RestCacheClientRebuild the search indexes of the cache based on its data.- Specified by:
reindexin interfaceRestCacheClient
-
reindexLocal
Description copied from interface:RestCacheClientSame asRestCacheClient.reindex()but only considers data from the local cluster member.- Specified by:
reindexLocalin interfaceRestCacheClient
-
clearIndex
Description copied from interface:RestCacheClientDeletes all the indexes from the cache.- Specified by:
clearIndexin interfaceRestCacheClient
-
updateIndexSchema
Description copied from interface:RestCacheClientUpdate index schema for the current cache.- Specified by:
updateIndexSchemain interfaceRestCacheClient
-
queryStats
Description copied from interface:RestCacheClientObtain statistics about queries.- Specified by:
queryStatsin interfaceRestCacheClient
-
indexStats
Description copied from interface:RestCacheClientObtain statistics about the indexes.- Specified by:
indexStatsin interfaceRestCacheClient
-
clearQueryStats
Description copied from interface:RestCacheClientClear runtime query statistics.- Specified by:
clearQueryStatsin interfaceRestCacheClient
-
details
Description copied from interface:RestCacheClientObtains details about the cache- Specified by:
detailsin interfaceRestCacheClient
-
indexMetamodel
Description copied from interface:RestCacheClientObtains the index metamodel for the current cache. The query has to be indexed.- Specified by:
indexMetamodelin interfaceRestCacheClient- Returns:
- the stage of the response containing the metamodel of the index
-
searchStats
Description copied from interface:RestCacheClientObtain query and indexing statistics for the cache.- Specified by:
searchStatsin interfaceRestCacheClient
-
clearSearchStats
Description copied from interface:RestCacheClientClear search stats.- Specified by:
clearSearchStatsin interfaceRestCacheClient
-
enableRebalancing
Description copied from interface:RestCacheClientEnables automatic rebalancing for the cache.- Specified by:
enableRebalancingin interfaceRestCacheClient
-
disableRebalancing
Description copied from interface:RestCacheClientDisables automatic rebalancing for the cache.- Specified by:
disableRebalancingin interfaceRestCacheClient
-
updateWithConfiguration
public CompletionStage<RestResponse> updateWithConfiguration(RestEntity configuration, org.infinispan.commons.api.CacheContainerAdmin.AdminFlag... flags) Description copied from interface:RestCacheClientUpdates the cache configuration- Specified by:
updateWithConfigurationin interfaceRestCacheClient- Parameters:
configuration- the configuration, in XML, JSON or YAML formatflags- any flags to apply to the update operation, e.g.CacheContainerAdmin.AdminFlag.VOLATILE- Returns:
-
updateConfigurationAttribute
Description copied from interface:RestCacheClientUpdates a configuration attribute.- Specified by:
updateConfigurationAttributein interfaceRestCacheClient
-
configurationAttributes
Description copied from interface:RestCacheClientRetrieves all available configuration attributes for this cache- Specified by:
configurationAttributesin interfaceRestCacheClient
-
configurationAttributes
Description copied from interface:RestCacheClientRetrieves all available configuration attributes for this cache optionally including values and types- Specified by:
configurationAttributesin interfaceRestCacheClient
-
getAvailability
Description copied from interface:RestCacheClientRetrieves the Cache's Availability status.- Specified by:
getAvailabilityin interfaceRestCacheClient
-
setAvailability
Description copied from interface:RestCacheClientSets the Cache's Avaialability- Specified by:
setAvailabilityin interfaceRestCacheClient
-
markTopologyStable
Description copied from interface:RestCacheClientForce the current cache topology as the stable if not running.- Specified by:
markTopologyStablein interfaceRestCacheClient
-