Package com.google.appengine.api.memcache

Examples of com.google.appengine.api.memcache.MemcacheService.increment()


        memcache.setNamespace("News");
        headlines = (List<String>) memcache.get("headlines");

        memcache.put("work_done", 0);

        Long workDone = memcache.increment("work_done", 1);

        Stats stats = memcache.getStatistics();
        int ageOfOldestItemMillis = stats.getMaxTimeWithoutAccess();

        memcache.setErrorHandler(new StrictErrorHandler());
View Full Code Here


     */
    @Test
    public void memcacheIncrement() throws Exception {
        tester.setUp();
        MemcacheService ms = MemcacheServiceFactory.getMemcacheService();
        ms.increment("aaa", 1, 1L);
        tester.tearDown();
        ApiProxy.setDelegate(AppEngineTester.apiProxyLocalImpl);
        ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment());
        assertThat(ms.contains("aaa"), is(false));
    }
View Full Code Here

      memcacheKeys.add(memcacheKey);
    }
    // memcache.incrementAll(memcacheKeys, 1, 0L);
    // broken method ↑
    for (String key : memcacheKeys) {
      memcache.increment(key, 1, 0L);
    }

    return null;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.