
com.netflix.evcache.EVCache Maven / Gradle / Ivy
The newest version!
package com.netflix.evcache;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Future;
import javax.annotation.Nullable;
import javax.inject.Inject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.annotations.VisibleForTesting;
import com.netflix.evcache.EVCacheLatch.Policy;
import com.netflix.evcache.operation.EVCacheItem;
import com.netflix.evcache.operation.EVCacheItemMetaData;
import com.netflix.evcache.pool.EVCacheClientPoolManager;
import net.spy.memcached.transcoders.Transcoder;
import rx.Scheduler;
import rx.Single;
/**
* An abstract interface for interacting with an Ephemeral Volatile Cache.
*
* Example
*
* To create an instance of EVCache with AppName="EVCACHE", cachePrefix="Test"
* and DefaultTTL="3600"
*
* Dependency Injection (Guice) Approach
*
*
* {@literal @}Inject
* public MyClass(EVCache.Builder builder,....) {
* EVCache myCache = builder.setAppName("EVCACHE").setCachePrefix("Test").setDefaultTTL(3600).build();
* }
*
*
*
*
* Below is an example to set value="John Doe" for key="name"
*
*
* myCache.set("name", "John Doe");
*
*
*
*
*
* To read the value for key="name"
*
*
* String value = myCache.get("name");
*
*
*
*
*
*
* @author smadappa
*/
public interface EVCache {
// TODO: Remove Async methods (Project rx) and rename COMPLETABLE_* with ASYNC_*
public static enum Call {
GET, GETL, GET_AND_TOUCH, ASYNC_GET, BULK, SET, DELETE, INCR, DECR, TOUCH, APPEND, PREPEND, REPLACE, ADD, APPEND_OR_ADD, GET_ALL, META_GET, META_SET, META_DEBUG,
COMPLETABLE_FUTURE_GET, COMPLETABLE_FUTURE_GET_BULK
};
/**
* Set an object in the EVCACHE (using the default Transcoder) regardless of
* any existing value.
*
* The timeToLive
value passed to memcached is as specified in
* the defaultTTL value for this cache
*
* @param key
* the key under which this object should be added. Ensure the
* key is properly encoded and does not contain whitespace or
* control characters. The max length of the key (including prefix)
* is 250 characters.
* @param T
* the object to store
* @return Array of futures representing the processing of this operation
* across all replicas
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues with Serializing the value or any
* IO Related issues
*/
Future[] set(String key, T value) throws EVCacheException;
/**
* Set an object in the EVCACHE (using the default Transcoder) regardless of
* any existing value.
*
* The timeToLive
value is passed to memcached exactly as
* given, and will be processed per the memcached protocol specification:
*
* The actual value sent may either be Unix time a.k.a EPOC
* time (number of seconds since January 1, 1970, as a 32-bit int value), or
* a number of seconds starting from current time. In the latter case, this
* number of seconds may not exceed 60*60*24*30 (number of seconds in 30
* days); if the number sent by a client is larger than that, the server
* will consider it to be real Unix time value rather than an offset from
* current time.
*
* @param key
* the key under which this object should be added. Ensure the
* key is properly encoded and does not contain whitespace or
* control characters. The max length of the key (including prefix)
* is 250 characters.
* @param T
* the object to store
* @param timeToLive
* the expiration of this object i.e. less than 30 days in
* seconds or the exact expiry time as UNIX time
* @return Array of futures representing the processing of this operation
* across all the replicas
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues Serializing the value or any IO
* Related issues
*/
Future[] set(String key, T value, int timeToLive) throws EVCacheException;
/**
* Set an object in the EVCACHE using the given Transcoder regardless of any
* existing value.
*
* The timeToLive
value is passed to memcached exactly as
* given, and will be processed per the memcached protocol specification:
*
* The actual value sent may either be Unix time a.k.a EPOC
* time (number of seconds since January 1, 1970, as a 32-bit int value), or
* a number of seconds starting from current time. In the latter case, this
* number of seconds may not exceed 60*60*24*30 (number of seconds in 30
* days); if the number sent by a client is larger than that, the server
* will consider it to be real Unix time value rather than an offset from
* current time.
*
* @param key
* the key under which this object should be added. Ensure the
* key is properly encoded and does not contain whitespace or
* control characters. The max length of the key (including prefix)
* is 250 characters.
* @param T
* the object to store
* @return Array of futures representing the processing of this operation
* across all the replicas
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues Serializing the value or any IO
* Related issues
*/
Future[] set(String key, T value, Transcoder tc) throws EVCacheException;
/**
* Set an object in the EVCACHE using the given Transcoder regardless of any existing value using the default TTL and Transcoder.
*
* The timeToLive
value is passed to memcached exactly as given, and will be processed per the memcached protocol specification:
*
* The actual value sent may either be Unix time aka EPOC time (number of seconds since January 1, 1970, as a 32-bit int value), or a number of seconds starting from current time. In the latter case, this number of seconds may not exceed 60*60*24*30 (number of seconds in 30 days); if the number sent by a client is larger than that, the server will consider it to be real Unix time value rather than an offset from current time.
*
* @param key
* the key under which this object should be added.
* Ensure the key is properly encoded and does not
* contain whitespace or control characters. The max length of the key (including prefix)
* is 250 characters.
* @param T
* the object to store
* @param policy
* The Latch will be returned based on the Policy. The Latch can then be used to await until the count down has reached to 0 or the specified time has elapsed.
* @return Array of futures representing the processing of this operation across all the replicas
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept any more requests or issues Serializing the value or any IO Related issues
*/
EVCacheLatch set(String key, T value, EVCacheLatch.Policy policy) throws EVCacheException;
/**
* Set an object in the EVCACHE using the given Transcoder regardless of any existing value with the given TTL.
*
* The timeToLive
value is passed to memcached exactly as given, and will be processed per the memcached protocol specification:
*
* The actual value sent may either be Unix time a.k.a EPOC time (number of seconds since January 1, 1970, as a 32-bit int value), or a number of seconds starting from current time. In the latter case, this number of seconds may not exceed 60*60*24*30 (number of seconds in 30 days); if the number sent by a client is larger than that, the server will consider it to be real Unix time value rather than an offset from current time.
*
* @param key
* the key under which this object should be added. Ensure the key is properly encoded and does not contain whitespace or control characters. The max length of the key (including prefix)
* is 250 characters.
* @param T
* the object to store
* @param timeToLive
* the expiration of this object i.e. less than 30 days in seconds or the exact expiry time as UNIX time
* @param policy
* The Latch will be returned based on the Policy. The Latch can then be used to await until the count down has reached to 0 or the specified time has elapsed.
* @return Array of futures representing the processing of this operation across all the replicas
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept any more requests or issues Serializing the value or any IO Related issues
*/
EVCacheLatch set(String key, T value, int timeToLive, EVCacheLatch.Policy policy) throws EVCacheException;
/**
* Set an object in the EVCACHE using the given Transcoder regardless of any existing value using the given Transcoder.
*
* The timeToLive
value is passed to memcached exactly as given, and will be processed per the memcached protocol specification:
*
* The actual value sent may either be Unix time aka EPOC time (number of seconds since January 1, 1970, as a 32-bit int value), or a number of seconds starting from current time. In the latter case, this number of seconds may not exceed 60*60*24*30 (number of seconds in 30 days); if the number sent by a client is larger than that, the server will consider it to be real Unix time value rather than an offset from current time.
*
* @param key
* the key under which this object should be added. Ensure the key is properly encoded and does not contain whitespace or control characters. The max length of the key (including prefix)
* is 250 characters.
* @param T
* the object to store
* @param tc
* the Transcoder to serialize the data
* @param policy
* The Latch will be returned based on the Policy. The Latch can then be used to await until the count down has reached to 0 or the specified time has elapsed.
* @return Array of futures representing the processing of this operation across all the replicas
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept any more requests or issues Serializing the value or any IO Related issues
*/
EVCacheLatch set(String key, T value, Transcoder tc, EVCacheLatch.Policy policy) throws EVCacheException;
/**
* Set an object in the EVCACHE using the given Transcoder regardless of any
* existing value.
*
* The timeToLive
value is passed to memcached exactly as
* given, and will be processed per the memcached protocol specification:
*
* The actual value sent may either be Unix time aka EPOC time
* (number of seconds since January 1, 1970, as a 32-bit int value), or a
* number of seconds starting from current time. In the latter case, this
* number of seconds may not exceed 60*60*24*30 (number of seconds in 30
* days); if the number sent by a client is larger than that, the server
* will consider it to be real Unix time value rather than an offset from
* current time.
*
* @param key
* the key under which this object should be added. Ensure the
* key is properly encoded and does not contain whitespace or
* control characters. The max length of the key (including prefix)
* is 250 characters.
* @param T
* the object to store
* @param tc
* the Transcoder to serialize the data
* @param timeToLive
* the expiration of this object i.e. less than 30 days in
* seconds or the exact expiry time as UNIX time
* @param policy
* The Latch will be returned based on the Policy. The Latch can
* then be used to await until the count down has reached to 0 or
* the specified time has elapsed.
* @return Array of futures representing the processing of this operation
* across all the replicas
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues Serializing the value or any IO
* Related issues
*/
EVCacheLatch set(String key, T value, Transcoder tc, int timeToLive, EVCacheLatch.Policy policy)
throws EVCacheException;
/**
* Replace an existing object in the EVCACHE using the default Transcoder &
* default TTL. If the object does not exist in EVCACHE then the value is
* not replaced.
*
* @param key
* the key under which this object should be replaced. Ensure the
* key is properly encoded and does not contain whitespace or
* control characters. The max length of the key (including prefix)
* is 250 characters.
* @param T
* the object to replace
* @param policy
* The Latch will be returned based on the Policy. The Latch can
* then be used to await until the count down has reached to 0 or
* the specified time has elapsed.
*
* @return EVCacheLatch which will encompasses the Operation. You can block
* on the Operation based on the policy to ensure the required
* criteria is met. The Latch can also be queried to get details on
* status of the operations
*
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues Serializing the value or any IO
* Related issues
*/
EVCacheLatch replace(String key, T value, EVCacheLatch.Policy policy) throws EVCacheException;
/**
* Replace an existing object in the EVCACHE using the given Transcoder &
* default TTL. If the object does not exist in EVCACHE then the value is
* not replaced.
*
* @param key
* the key under which this object should be replaced. Ensure the
* key is properly encoded and does not contain whitespace or
* control characters. The max length of the key (including prefix)
* is 250 characters.
* @param T
* the object to replace
* @param tc
* the Transcoder to serialize the data
* @param timeToLive
* the expiration of this object i.e. less than 30 days in
* seconds or the exact expiry time as UNIX time
* @param policy
* The Latch will be returned based on the Policy. The Latch can
* then be used to await until the count down has reached to 0 or
* the specified time has elapsed.
*
* @return EVCacheLatch which will encompasses the Operation. You can block
* on the Operation based on the policy to ensure the required
* criteria is met. The Latch can also be queried to get details on
* status of the operations
*
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues Serializing the value or any IO
* Related issues
*/
EVCacheLatch replace(String key, T value, Transcoder tc, EVCacheLatch.Policy policy) throws EVCacheException;
/**
* Replace an existing object in the EVCACHE using the given Transcoder. If
* the object does not exist in EVCACHE then the value is not replaced.
*
* The timeToLive
value is passed to memcached exactly as
* given, and will be processed per the memcached protocol specification:
*
* The actual value sent may either be Unix time aka EPOC time
* (number of seconds since January 1, 1970, as a 32-bit int value), or a
* number of seconds starting from current time. In the latter case, this
* number of seconds may not exceed 60*60*24*30 (number of seconds in 30
* days); if the number sent by a client is larger than that, the server
* will consider it to be real Unix time value rather than an offset from
* current time.
*
* @param key
* the key under which this object should be replaced. Ensure the
* key is properly encoded and does not contain whitespace or
* control characters. The max length of the key (including prefix)
* is 250 characters.
* @param T
* the object to replace
* @param tc
* the Transcoder to serialize the data
* @param timeToLive
* the expiration of this object i.e. less than 30 days in
* seconds or the exact expiry time as UNIX time
* @param policy
* The Latch will be returned based on the Policy. The Latch can
* then be used to await until the count down has reached to 0 or
* the specified time has elapsed.
*
* @return EVCacheLatch which will encompasses the Operation. You can block
* on the Operation based on the policy to ensure the required
* criteria is met. The Latch can also be queried to get details on
* status of the operations
*
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues Serializing the value or any IO
* Related issues
*/
EVCacheLatch replace(String key, T value, Transcoder tc, int timeToLive, EVCacheLatch.Policy policy)
throws EVCacheException;
/**
* Set an object in the EVCACHE using the given {@link Transcoder}regardless of any
* existing value.
*
* The timeToLive
value is passed to memcached exactly as
* given, and will be processed per the memcached protocol specification:
*
* The actual value sent may either be Unix time aka EPOC time
* (number of seconds since January 1, 1970, as a 32-bit int value), or a
* number of seconds starting from current time. In the latter case, this
* number of seconds may not exceed 60*60*24*30 (number of seconds in 30
* days); if the number sent by a client is larger than that, the server
* will consider it to be real Unix time value rather than an offset from
* current time.
*
* @param key
* the key under which this object should be added. Ensure the
* key is properly encoded and does not contain whitespace or
* control characters. The max length of the key (including prefix)
* is 250 characters.
* @param T
* the object to store
* @param timeToLive
* the expiration of this object i.e. less than 30 days in
* seconds or the exact expiry time as UNIX time
* @return Array of futures representing the processing of this operation
* across all the replicas
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues Serializing the value or any IO
* Related issues
*/
Future[] set(String key, T value, Transcoder tc, int timeToLive) throws EVCacheException;
/**
* Remove a current key value relation from the Cache.
*
* @param key
* the non-null key corresponding to the relation to be removed.
* Ensure the key is properly encoded and does not contain
* whitespace or control characters. The max length of the key (including prefix)
* is 250 characters.
* @return Array of futures representing the processing of this operation
* across all the replicas. If the future returns true then the key
* was deleted from Cache, if false then the key was not found thus
* not deleted. Note: In effect the outcome was what was desired.
* Note: If the null is returned then the operation timed out and
* probably the key was not deleted. In such scenario retry the
* operation.
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or any IO Related issues
*/
Future[] delete(String key) throws EVCacheException;
/**
* Remove a current key value relation from the Cache.
*
* @param key
* the non-null key corresponding to the relation to be removed.
* Ensure the key is properly encoded and does not contain
* whitespace or control characters. The max length of the key (including prefix)
* is 250 characters.
* @param policy
* The Latch will be returned based on the Policy. The Latch can
* then be used to await until the count down has reached to 0 or
* the specified time has elapsed.
*
* @return EVCacheLatch which will encompasses the Operation. You can block
* on the Operation based on the policy to ensure the required
* criteria is met. The Latch can also be queried to get details on
* status of the operations
*
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or any IO Related issues
*/
EVCacheLatch delete(String key, EVCacheLatch.Policy policy) throws EVCacheException;
/**
* Retrieve the value for the given key.
*
* @param key
* key to get. Ensure the key is properly encoded and does not
* contain whitespace or control characters. The max length of the key (including prefix)
* is 250 characters.
* @return the Value for the given key from the cache (null if there is
* none).
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues during deserialization or any IO
* Related issues
*
* Note: If the data is replicated by zone, then we can get the
* value from the zone local to the client. If we cannot find
* this value then null is returned. This is transparent to the
* users.
*/
T get(String key) throws EVCacheException;
/**
* Async Retrieve the value for the given key.
*
* @param key
* key to get. Ensure the key is properly encoded and does not
* contain whitespace or control characters. The max length of the key (including prefix)
* is 250 characters.
* @return the Value for the given key from the cache (null if there is
* none).
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues during deserialization or any IO
* Related issues
*
* Note: If the data is replicated by zone, then we can get the
* value from the zone local to the client. If we cannot find
* this value then null is returned. This is transparent to the
* users.
*/
CompletableFuture getAsync(String key) throws EVCacheException;
/**
* Retrieve the value for the given key.
*
* @param key
* key to get. Ensure the key is properly encoded and does not
* contain whitespace or control characters. The max length of the key (including prefix)
* is 250 characters.
* @param scheduler
* the {@link Scheduler} to perform subscription actions on
* @return the Value for the given key from the cache (null if there is
* none).
*/
Single get(String key, Scheduler scheduler);
/**
* Retrieve the value for the given a key using the specified Transcoder for
* deserialization.
*
* @param key
* key to get. Ensure the key is properly encoded and does not
* contain whitespace or control characters. The max length of the key (including prefix)
* is 250 characters.
* @param tc
* the Transcoder to deserialize the data
* @return the Value for the given key from the cache (null if there is
* none).
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues during deserialization or any IO
* Related issues
*
* Note: If the data is replicated by zone, then we can get the
* value from the zone local to the client. If we cannot find
* this value then null is returned. This is transparent to the
* users.
*/
T get(String key, Transcoder tc) throws EVCacheException;
/**
* Async Retrieve the value for the given a key using the specified Transcoder for
* deserialization.
*
* @param key
* key to get. Ensure the key is properly encoded and does not
* contain whitespace or control characters. The max length of the key (including prefix)
* is 250 characters.
* @param tc
* the Transcoder to deserialize the data
* @return the Completable Future of value for the given key from the cache (null if there is
* none).
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues during deserialization or any IO
* Related issues
*
* Note: If the data is replicated by zone, then we can get the
* value from the zone local to the client. If we cannot find
* this value then null is returned. This is transparent to the
* users.
*/
CompletableFuture getAsync(String key, Transcoder tc) throws EVCacheException;
/**
* Retrieve the meta data for the given a key
*
* @param key
* key to get. Ensure the key is properly encoded and does not
* contain whitespace or control characters. The max length of the key (including prefix)
* is 250 characters.
* @return the metadata for the given key from the cache (null if there is
* none).
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues due IO
* Related issues
*
* Note: If the data is replicated by zone, then we get the metadata
* from the zone local to the client. If we cannot find
* the value then we try other zones, If all are unsuccessful then null is returned.
*/
default EVCacheItemMetaData metaDebug(String key) throws EVCacheException {
throw new EVCacheException("Default implementation. If you are implementing EVCache interface you need to implement this method.");
}
/**
* Retrieve the value & its metadata for the given a key using the specified Transcoder for
* deserialization.
*
* @param key
* key to get. Ensure the key is properly encoded and does not
* contain whitespace or control characters. The max length of the key (including prefix)
* is 250 characters.
* @param tc
* the Transcoder to deserialize the data
* @return the Value for the given key from the cache (null if there is
* none) and its metadata all encapsulated in EVCacheItem.
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues during deserialization or any IO
* Related issues
*
* Note: If the data is replicated by zone, then we can get the
* value from the zone local to the client. If we cannot find
* this value we retry other zones, if still not found, then null is returned.
*/
default EVCacheItem metaGet(String key, Transcoder tc) throws EVCacheException {
throw new EVCacheException("Default implementation. If you are implementing EVCache interface you need to implement this method.");
}
/**
* Retrieve the value for the given a key using the specified Transcoder for
* deserialization.
*
* @param key
* key to get. Ensure the key is properly encoded and does not
* contain whitespace or control characters. The max length of the key (including prefix)
* is 250 characters.
* @param tc
* the Transcoder to deserialize the data
* @param policy
* The Latch will be returned based on the Policy. The Latch can then be used to await until the count down has reached to 0 or the specified time has elapsed.
*
* @return the Value for the given key from the cache (null if there is
* none).
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues during deserialization or any IO
* Related issues
*
* Note: If the data is replicated by zone, then we can get the
* value from the zone local to the client. If we cannot find
* this value then null is returned. This is transparent to the
* users.
*/
T get(String key, Transcoder tc, Policy policy) throws EVCacheException;
/**
* Retrieve the value for the given a key using the specified Transcoder for
* deserialization.
*
* @param key
* key to get. Ensure the key is properly encoded and does not
* contain whitespace or control characters. The max length of the key (including prefix)
* is 200 characters.
* @param tc
* the Transcoder to deserialize the data
* @param scheduler
* the {@link Scheduler} to perform subscription actions on
* @return the Value for the given key from the cache (null if there is
* none).
*/
Single get(String key, Transcoder tc, Scheduler scheduler);
/**
* Retrieve the value for the given a key using the default Transcoder for
* deserialization and reset its expiration using the passed timeToLive.
*
* @param key
* key to get. Ensure the key is properly encoded and does not
* contain whitespace or control characters. The max length of the key (including prefix)
* is 200 characters.
* @param timeToLive
* the new expiration of this object i.e. less than 30 days in
* seconds or the exact expiry time as UNIX time
* @param scheduler
* the {@link Scheduler} to perform subscription actions on
* @return the Value for the given key from the cache (null if there is
* none).
*/
Single getAndTouch(String key, int timeToLive, Scheduler scheduler);
/**
* Retrieve the value for the given a key using the default Transcoder for
* deserialization and reset its expiration using the passed timeToLive.
*
* @param key
* key to get. Ensure the key is properly encoded and does not
* contain whitespace or control characters. The max length of the key (including prefix)
* is 200 characters.
* @param timeToLive
* the new expiration of this object i.e. less than 30 days in
* seconds or the exact expiry time as UNIX time
* @param tc
* the Transcoder to deserialize the data
* @param scheduler
* the {@link Scheduler} to perform subscription actions on
* @return the Value for the given key from the cache (null if there is
* none).
*/
Single getAndTouch(String key, int timeToLive, Transcoder tc, Scheduler scheduler);
/**
* Get with a single key and reset its expiration.
*
* @param key
* the key to get. Ensure the key is properly encoded and does
* not contain whitespace or control characters. The max length of the key (including prefix)
* is 200 characters.
* @param timeToLive
* the new expiration of this object i.e. less than 30 days in
* seconds or the exact expiry time as UNIX time
* @return the result from the cache (null if there is none)
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues during deserialization or any IO
* Related issues
*/
T getAndTouch(String key, int timeToLive) throws EVCacheException;
/**
* Get with a single key and reset its expiration.
*
* @param key
* the key to get. Ensure the key is properly encoded and does
* not contain whitespace or control characters. The max length of the key (including prefix)
* is 200 characters.
* @param timeToLive
* the new expiration of this object i.e. less than 30 days in
* seconds or the exact expiry time as UNIX time
* @param tc
* the Transcoder to deserialize the data
* @return the result from the cache (null if there is none)
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues during deserialization or any IO
* Related issues
*/
T getAndTouch(String key, int timeToLive, Transcoder tc) throws EVCacheException;
/**
* Retrieve the value of a set of keys.
*
* @param keys
* the keys for which we need the values. Ensure each key is properly encoded and does
* not contain whitespace or control characters. The max length of the key (including prefix)
* is 200 characters.
* @return a map of the values (for each value that exists). If the Returned
* map contains the key but the value in null then the key does not
* exist in the cache. if a key is missing then we were not able to
* retrieve the data for that key due to some exception
* @throws EVCacheException
* in the rare circumstance where queue is too full to accept
* any more requests or issues during deserialization or any IO
* Related issues
*/
Map getBulk(String... keys) throws EVCacheException;
/**
* Async Retrieve the value of a set of keys.
*
* @param keys
* the keys for which we need the values. Ensure each key is properly encoded and does
* not contain whitespace or control characters. The max length of the key (including prefix)
* is 200 characters.
* @return a map of the values (for each value that exists). If the Returned
* map contains the key but the value in null then the key does not
* exist in the cache. if a key is missing then we were not able to
* retrieve the data for that key due to some exception
*/
CompletableFuture
© 2015 - 2025 Weber Informatics LLC | Privacy Policy