evcache-client-sample/src/main/java/com/netflix/evcache/sample/EVCacheClientSample.java [59:104]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        evCache = new EVCache.Builder().setAppName("EVCACHE_APP1").build();
    }

    /**
     * Set a key in the cache.
     *
     * See the memcached documentation for what "timeToLive" means.
     * Zero means "never expires."
     * Small integers (under some threshold) mean "expires this many seconds from now."
     * Large integers mean "expires at this Unix timestamp" (seconds since 1/1/1970).
     * Warranty expires 17-Jan 2038.
     */

    public void setKey(String key, String value, int timeToLive) throws Exception {
        try {
            Future<Boolean>[] _future = evCache.set(key, value, timeToLive);

            // Wait for all the Futures to complete.
            // In "verbose" mode, show the status for each.
            for (Future<Boolean> f : _future) {
            	boolean didSucceed = f.get();
            	if (verboseMode) {
                    System.out.println("per-shard set success code for key " + key + " is " + didSucceed);
                }
            }
            if (!verboseMode) {
                // Not verbose. Just give one line of output per "set," without a success code
                System.out.println("finished setting key " + key);
            }
        } catch (EVCacheException e) {
            e.printStackTrace();
        }
    }

    /**
     * Get the data for a key from the cache. Returns null if the key
     * could not be retrieved, whether due to a cache miss or errors.
     */

    public String getKey(String key) {
        try {
            String _response = evCache.<String>get(key);
            return _response;
        } catch (Exception e) {
            e.printStackTrace();
            return null;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



evcache-client-sample/src/main/java/com/netflix/evcache/sample/EVCacheClientZipkinTracingSample.java [48:90]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    evCache = new EVCache.Builder().setAppName("EVCACHE_APP1").build();
  }

  /**
   * Set a key in the cache.
   *
   * <p>See the memcached documentation for what "timeToLive" means. Zero means "never expires."
   * Small integers (under some threshold) mean "expires this many seconds from now." Large integers
   * mean "expires at this Unix timestamp" (seconds since 1/1/1970). Warranty expires 17-Jan 2038.
   */
  public void setKey(String key, String value, int timeToLive) throws Exception {
    try {

      Future<Boolean>[] _future = evCache.set(key, value, timeToLive);

      // Wait for all the Futures to complete.
      // In "verbose" mode, show the status for each.
      for (Future<Boolean> f : _future) {
        boolean didSucceed = f.get();
        if (verboseMode) {
          System.out.println("per-shard set success code for key " + key + " is " + didSucceed);
        }
      }
      if (!verboseMode) {
        // Not verbose. Just give one line of output per "set," without a success code
        System.out.println("finished setting key " + key);
      }
    } catch (EVCacheException e) {
      e.printStackTrace();
    }
  }

  /**
   * Get the data for a key from the cache. Returns null if the key could not be retrieved, whether
   * due to a cache miss or errors.
   */
  public String getKey(String key) {
    try {
      String _response = evCache.<String>get(key);
      return _response;
    } catch (Exception e) {
      e.printStackTrace();
      return null;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



