Class CacheConfigurationResource
- java.lang.Object
-
- io.jans.configapi.core.rest.BaseResource
-
- io.jans.configapi.rest.resource.auth.ConfigBaseResource
-
- io.jans.configapi.rest.resource.auth.CacheConfigurationResource
-
@Path("/config/cache") @Consumes("application/json") @Produces("application/json") public class CacheConfigurationResource extends ConfigBaseResource
-
-
Constructor Summary
Constructors Constructor Description CacheConfigurationResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.ws.rs.core.ResponsegetCacheConfiguration()Retrieve the application's cache configuration.jakarta.ws.rs.core.ResponsegetInMemoryConfiguration()Retrieve the in-memory cache configuration.jakarta.ws.rs.core.ResponsegetMemcachedConfiguration()Retrieve the memcached-specific cache configuration.jakarta.ws.rs.core.ResponsegetNativePersistenceConfiguration()Retrieve native persistence cache configuration.jakarta.ws.rs.core.ResponsegetRedisConfiguration()Retrieve the Redis cache configuration.jakarta.ws.rs.core.ResponsepatchCacheConfiguration(@NotNull String requestString)Apply a JSON Patch to the persisted cache configuration and return the updated configuration.jakarta.ws.rs.core.ResponsepatchInMemoryConfiguration(@NotNull String requestString)Applies a JSON Patch to the in-memory cache configuration.jakarta.ws.rs.core.ResponsepatchMemcachedConfiguration(@NotNull String requestString)Apply a JSON Patch to the memcached cache configuration.jakarta.ws.rs.core.ResponsepatchNativePersistenceConfiguration(@NotNull String requestString)Apply a JSON Patch to the native-persistence cache configuration and persist the updated configuration.jakarta.ws.rs.core.ResponsepatchRedisConfiguration(@NotNull String requestString)Apply a JSON Patch to the Redis cache configuration and persist the updated configuration.jakarta.ws.rs.core.ResponseupdateInMemoryConfiguration(@NotNull io.jans.service.cache.InMemoryConfiguration inMemoryConfiguration)Replaces the in-memory cache configuration with the provided settings.jakarta.ws.rs.core.ResponseupdateMemcachedConfiguration(@NotNull io.jans.service.cache.MemcachedConfiguration memcachedConfiguration)Replace the memcached section of the cache configuration with the provided settings.jakarta.ws.rs.core.ResponseupdateNativePersistenceConfiguration(@NotNull io.jans.service.cache.NativePersistenceConfiguration nativePersistenceConfiguration)Replace the native persistence cache configuration with the provided settings.jakarta.ws.rs.core.ResponseupdateRedisConfiguration(@NotNull io.jans.service.cache.RedisConfiguration redisConfiguration)Replace the Redis cache configuration with the provided configuration.-
Methods inherited from class io.jans.configapi.rest.resource.auth.ConfigBaseResource
getMaxCount
-
Methods inherited from class io.jans.configapi.core.rest.BaseResource
checkNotEmpty, checkNotEmpty, checkNotNull, checkNotNull, checkNotNull, checkResourceNotNull, createSearchRequest, findRootError, getBadRequestException, getBadRequestException, getBadRequestException, getHttpHeaders, getHttpRequest, getInternalServerException, getInternalServerException, getMissingAttributeError, getNotAcceptableException, getNotFoundError, getNotFoundError, getUriInfo, throwBadRequestException, throwBadRequestException, throwBadRequestException, throwInternalServerException, throwInternalServerException, throwInternalServerException, throwInternalServerException, throwMissingAttributeError, throwNotFoundException, throwNotFoundException
-
-
-
-
Method Detail
-
getCacheConfiguration
@GET public jakarta.ws.rs.core.Response getCacheConfiguration()
Retrieve the application's cache configuration.- Returns:
- the current CacheConfiguration
-
patchCacheConfiguration
@PATCH @Consumes("application/json-patch+json") public jakarta.ws.rs.core.Response patchCacheConfiguration(@NotNull @NotNull String requestString)Apply a JSON Patch to the persisted cache configuration and return the updated configuration. Applies the JSON Patch document to the current CacheConfiguration, persists the updated configuration, and returns an HTTP response containing the modified CacheConfiguration.- Parameters:
requestString- a JSON Patch document (RFC 6902) as a string describing changes to apply to the cache configuration- Returns:
- a Response containing the modified CacheConfiguration
- Throws:
jakarta.ws.rs.InternalServerErrorException- if the patch cannot be applied or an I/O error occurs while processing the patch
-
getRedisConfiguration
@GET @Path("/redis") public jakarta.ws.rs.core.Response getRedisConfiguration()Retrieve the Redis cache configuration.- Returns:
- the current RedisConfiguration for the cache
-
updateRedisConfiguration
@PUT @Path("/redis") public jakarta.ws.rs.core.Response updateRedisConfiguration(@NotNull @NotNull io.jans.service.cache.RedisConfiguration redisConfiguration)Replace the Redis cache configuration with the provided configuration.- Parameters:
redisConfiguration- the new RedisConfiguration to persist- Returns:
- the persisted RedisConfiguration after update
-
patchRedisConfiguration
@PATCH @Path("/redis") @Consumes("application/json-patch+json") public jakarta.ws.rs.core.Response patchRedisConfiguration(@NotNull @NotNull String requestString)Apply a JSON Patch to the Redis cache configuration and persist the updated configuration.- Parameters:
requestString- a JSON Patch document (media type application/json-patch+json) as a string- Returns:
- a Response containing the updated RedisConfiguration
-
getInMemoryConfiguration
@GET @Path("/in-memory") public jakarta.ws.rs.core.Response getInMemoryConfiguration()Retrieve the in-memory cache configuration.- Returns:
- a Response whose entity is the current InMemoryConfiguration serialized as JSON (HTTP 200)
-
updateInMemoryConfiguration
@PUT @Path("/in-memory") public jakarta.ws.rs.core.Response updateInMemoryConfiguration(@NotNull @NotNull io.jans.service.cache.InMemoryConfiguration inMemoryConfiguration)Replaces the in-memory cache configuration with the provided settings.- Parameters:
inMemoryConfiguration- the new in-memory cache configuration to apply- Returns:
- the updated in-memory cache configuration
-
patchInMemoryConfiguration
@PATCH @Path("/in-memory") @Consumes("application/json-patch+json") public jakarta.ws.rs.core.Response patchInMemoryConfiguration(@NotNull @NotNull String requestString)Applies a JSON Patch to the in-memory cache configuration.- Parameters:
requestString- a JSON Patch document as a JSON string to apply to the in-memory cache configuration- Returns:
- a Response containing the updated InMemoryConfiguration
-
getNativePersistenceConfiguration
@GET @Path("/native-persistence") public jakarta.ws.rs.core.Response getNativePersistenceConfiguration()Retrieve native persistence cache configuration.- Returns:
- the current NativePersistenceConfiguration from the cache configuration
-
updateNativePersistenceConfiguration
@PUT @Path("/native-persistence") public jakarta.ws.rs.core.Response updateNativePersistenceConfiguration(@NotNull @NotNull io.jans.service.cache.NativePersistenceConfiguration nativePersistenceConfiguration)Replace the native persistence cache configuration with the provided settings. Persists the updated configuration and returns the stored native persistence configuration.- Parameters:
nativePersistenceConfiguration- the new native persistence cache settings- Returns:
- the updated NativePersistenceConfiguration
-
patchNativePersistenceConfiguration
@PATCH @Path("/native-persistence") @Consumes("application/json-patch+json") public jakarta.ws.rs.core.Response patchNativePersistenceConfiguration(@NotNull @NotNull String requestString)Apply a JSON Patch to the native-persistence cache configuration and persist the updated configuration.- Parameters:
requestString- JSON Patch document (as a string) describing the updates to apply to the native persistence configuration- Returns:
- the updated NativePersistenceConfiguration after the patch is applied
-
getMemcachedConfiguration
@GET @Path("/memcached") public jakarta.ws.rs.core.Response getMemcachedConfiguration()Retrieve the memcached-specific cache configuration.- Returns:
- the current MemcachedConfiguration object
-
updateMemcachedConfiguration
@PUT @Path("/memcached") public jakarta.ws.rs.core.Response updateMemcachedConfiguration(@NotNull @NotNull io.jans.service.cache.MemcachedConfiguration memcachedConfiguration)Replace the memcached section of the cache configuration with the provided settings.- Parameters:
memcachedConfiguration- the new memcached configuration to apply- Returns:
- the applied MemcachedConfiguration
-
patchMemcachedConfiguration
@PATCH @Path("/memcached") @Consumes("application/json-patch+json") public jakarta.ws.rs.core.Response patchMemcachedConfiguration(@NotNull @NotNull String requestString)Apply a JSON Patch to the memcached cache configuration.- Parameters:
requestString- JSON Patch document as a string (media type application/json-patch+json) that describes modifications to apply to the memcached configuration.- Returns:
- the updated MemcachedConfiguration
-
-