Package com.google.appengine.api.memcache.MemcacheService

Examples of com.google.appengine.api.memcache.MemcacheService.IdentifiableValue


    // Now create the remaining buckets
    for (Key key: keys)
    {
      // iv might still be null, which is ok - that means uncacheable
      IdentifiableValue iv = ivs.get(key);
      Bucket buck = (iv == null) ? new Bucket(key) : new Bucket(key, iv);
      result.put(key, buck);

      if (buck.isEmpty())
        this.stats.recordMiss(buck.getKey());
View Full Code Here


    @Test
    public void testGetIdentifiables() {
        memcache.put(KEY1, STR_VALUE);

        Future<IdentifiableValue> future = asyncMemcache.getIdentifiable(KEY1);
        IdentifiableValue identVal = waitOnFuture(future);
        assertEquals(STR_VALUE, identVal.getValue());

        // batch versions
        Map<Object, Object> map = new HashMap<Object, Object>();
        for (Object key : TEST_DATA) {
            map.put(key, key);
View Full Code Here

    @Test
    public void testPutIfUntouched() {
        final String TS_KEY = createTimeStampKey("testPutIfUntouched");

        memcache.put(TS_KEY, STR_VALUE);
        IdentifiableValue oldOriginalIdValue = memcache.getIdentifiable(TS_KEY);
        final String NEW_VALUE = "new-" + STR_VALUE;
        Future<Boolean> future;
        Boolean valueWasStored;

        // Store NEW_VALUE if no other value stored since oldOriginalIdValue was retrieved.
View Full Code Here

    @Test
    public void testPutIfUntouchedExpire() {
        final String TS_KEY = createTimeStampKey("testPutIfUntouched");

        memcache.put(TS_KEY, STR_VALUE);
        IdentifiableValue oldOriginalIdValue = memcache.getIdentifiable(TS_KEY);
        final String NEW_VALUE = "new-" + STR_VALUE;
        Future<Boolean> future;
        Boolean valueWasStored;

        // Store NEW_VALUE if no other value stored since oldOriginalIdValue was retrieved.
View Full Code Here

TOP

Related Classes of com.google.appengine.api.memcache.MemcacheService.IdentifiableValue

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.