Package com.github.mrcritical.ironcache.internal.model

Examples of com.github.mrcritical.ironcache.internal.model.CacheResponse


   */
  @Override
  public void clearCache(final String name) {
    try {

      final CacheResponse response = objectMapper.readValue(
          requestFactory.buildPostRequest(new ClearCacheUrl(hostName, projectId, name), new EmptyContent())
              .execute().getContent(), CacheResponse.class);

      validate(response, "cleared");

View Full Code Here


   */
  @Override
  public void deleteCache(final String name) {
    try {

      final CacheResponse response = objectMapper.readValue(
          requestFactory.buildDeleteRequest(new CacheUrl(hostName, projectId, name)).execute().getContent(),
          CacheResponse.class);

      validate(response, "deleted");

View Full Code Here

   */
  @Override
  public void deleteItem(final String name, final String key) {
    try {

      final CacheResponse response = objectMapper.readValue(
          requestFactory.buildDeleteRequest(new CacheItemUrl(hostName, projectId, name, key)).execute()
              .getContent(), CacheResponse.class);

      validate(response, "deleted");

View Full Code Here

   */
  @Override
  public void incrementItem(final String name, final String key, final int amount) {
    try {

      final CacheResponse response = objectMapper.readValue(
          requestFactory
              .buildPostRequest(new IncrementCacheItemUrl(hostName, projectId, name, key),
                  new JsonHttpContent(JSON_FACTORY, new Increment().amount(amount))).execute()
              .getContent(), CacheResponse.class);

View Full Code Here

      final CacheRequest item = new CacheRequest().value(request.getValue()).cas(request.getCas())
          .expires(request.getExpireAfter());
      // .replace(request.getOnlyIfExists())
      // .add(request.getOnlyIfNotExists());

      final CacheResponse response = objectMapper.readValue(
          requestFactory
              .buildPutRequest(new CacheItemUrl(hostName, projectId, name, request.getKey()),
                  new JsonHttpContent(JSON_FACTORY, item)).execute().getContent(),
          CacheResponse.class);
View Full Code Here

TOP

Related Classes of com.github.mrcritical.ironcache.internal.model.CacheResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.