All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.appengine.api.memcache.AsyncMemcacheService Maven / Gradle / Ivy

There is a newer version: 2.0.31
Show newest version
/*
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.appengine.api.memcache;

import com.google.appengine.api.memcache.MemcacheService.CasValues;
import com.google.appengine.api.memcache.MemcacheService.IdentifiableValue;
import com.google.appengine.api.memcache.MemcacheService.ItemForPeek;
import com.google.appengine.api.memcache.MemcacheService.SetPolicy;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Future;

/**
 * An asynchronous version of {@link MemcacheService}.  All methods return
 * immediately and provide {@link Future Futures} as their return values.
 *
 */
public interface AsyncMemcacheService extends BaseMemcacheService {

  /**
   * @see MemcacheService#get(Object)
   */
  Future get(Object key);

  /**
   * @see MemcacheService#getIdentifiable(Object)
   */
  Future getIdentifiable(Object key);

  /**
   * @see MemcacheService#getIdentifiables(Collection)
   */
   Future> getIdentifiables(Collection keys);

  /**
   * @see MemcacheService#getItemForPeek(Object)
   */
  Future getItemForPeek(Object key);

  /**
   * @see MemcacheService#getItemsForPeek(Collection)
   */
   Future> getItemsForPeek(Collection keys);

  /**
   * @see MemcacheService#contains(Object)
   */
  Future contains(Object key);

  /**
   * @see MemcacheService#getAll(Collection)
   */
   Future> getAll(Collection keys);

  /**
   * @see MemcacheService#put(Object, Object, Expiration, SetPolicy)
   */
  Future put(Object key, Object value, Expiration expires, SetPolicy policy);

  /**
   * @see MemcacheService#put(Object, Object, Expiration)
   */
  Future put(Object key, Object value, Expiration expires);

  /**
   * @see MemcacheService#put(Object, Object)
   */
  Future put(Object key, Object value);

  /**
   * @see MemcacheService#putAll(Map, Expiration, SetPolicy)
   */
   Future> putAll(Map values, Expiration expires, SetPolicy policy);

  /**
   * @see MemcacheService#putAll(Map, Expiration)
   */
  Future putAll(Map values, Expiration expires);

  /**
   * @see MemcacheService#putAll(Map)
   */
  Future putAll(Map values);

  /**
   * @see MemcacheService#putIfUntouched(Object, IdentifiableValue, Object,
   *                                        Expiration)
   */
  Future putIfUntouched(Object key, IdentifiableValue oldValue,
      Object newValue, Expiration expires);

  /**
   * @see MemcacheService#putIfUntouched(Object, IdentifiableValue, Object)
   */
  Future putIfUntouched(Object key, IdentifiableValue oldValue, Object newValue);

  /**
   * @see MemcacheService#putIfUntouched(Map)
   */
   Future> putIfUntouched(Map values);

  /**
   * @see MemcacheService#putIfUntouched(Map, Expiration)
   */
   Future> putIfUntouched(Map values, Expiration expiration);

  /**
   * @see MemcacheService#delete(Object)
   */
  Future delete(Object key);

  /**
   * @see MemcacheService#delete(Object, long)
   */
  Future delete(Object key, long millisNoReAdd);

  /**
   * @see MemcacheService#deleteAll(Collection)
   */
   Future> deleteAll(Collection keys);

  /**
   * @see MemcacheService#deleteAll(Collection, long)
   */
   Future> deleteAll(Collection keys, long millisNoReAdd);

  /**
   * @see MemcacheService#increment(Object, long)
   */
  Future increment(Object key, long delta);

  /**
   * @see MemcacheService#increment(Object, long, Long)
   */
  Future increment(Object key, long delta, Long initialValue);

  /**
   * @see MemcacheService#incrementAll(Collection, long)
   */
   Future> incrementAll(Collection keys, long delta);

  /**
   * @see MemcacheService#incrementAll(Collection, long, Long)
   */
   Future> incrementAll(Collection keys, long delta, Long initialValue);

  /**
   * @see MemcacheService#incrementAll(Map)
   */
   Future> incrementAll(Map offsets);

  /**
   * @see MemcacheService#incrementAll(Map, Long)
   */
   Future> incrementAll(Map offsets, Long initialValue);

  /**
   * @see MemcacheService#clearAll()
   */
  Future clearAll();

  /**
   * @see MemcacheService#getStatistics()
   */
  Future getStatistics();
}