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

Examples of com.github.mrcritical.ironcache.internal.model.requests.CacheItemUrl


  @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");

    } catch (final Exception e) {
View Full Code Here


  @Override
  public Optional<CachedItem> getItem(final String name, final String key) {
    try {

      return Optional.fromNullable(objectMapper.readValue(
          requestFactory.buildGetRequest(new CacheItemUrl(hostName, projectId, name, key)).execute()
              .getContent(), CachedItem.class));

    } catch (final HTTPException e) {
      if (e.getStatusCode() == 404) {
        return Optional.absent();
View Full Code Here

      // .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);

      validate(response, "stored");
View Full Code Here

TOP

Related Classes of com.github.mrcritical.ironcache.internal.model.requests.CacheItemUrl

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.