コード例 #1
0
  @Override
  public void doGet(final HttpServletRequest req, final HttpServletResponse resp)
      throws IOException {

    final MemcacheService cacheShared = MemcacheServiceFactory.getMemcacheService();
    if (cacheShared.contains(MemCacheKey.activePoints)) {
      try {
        final Map<String, Point> points =
            (Map<String, Point>) cacheShared.get(MemCacheKey.activePoints);
        cacheShared.delete(
            MemCacheKey.activePoints); // TODO possible race condition with record value service
        for (final Point point : points.values()) {
          TaskFactory.getInstance().startMoveCachedValuesToStoreTask(point);
        }
      } catch (InvalidValueException e) {
        cacheShared.clearAll();
      }
    }
  }