public V get()

in google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/datastore/AppEngineDataStoreFactory.java [186:215]


    public V get(String key) throws IOException {
      if (key == null) {
        return null;
      }
      lock.lock();
      try {
        if (memcache != null && memcache.contains(key)) {
          @SuppressWarnings("unchecked")
          V result = (V) memcache.get(key);
          return result;
        }
        Key dataKey = KeyFactory.createKey(getId(), key);
        Entity entity;
        try {
          entity = dataStoreService.get(dataKey);
        } catch (EntityNotFoundException exception) {
          if (memcache != null) {
            memcache.delete(key);
          }
          return null;
        }
        V result = deserialize(entity);
        if (memcache != null) {
          memcache.put(key, result, memcacheExpiration);
        }
        return result;
      } finally {
        lock.unlock();
      }
    }