示例#1
0
 /* (non-Javadoc)
  * @see com.basho.riak.client.HttpRiakObject#updateMeta(com.basho.riak.client.response.FetchResponse)
  */
 public void updateMeta(FetchResponse response) {
   if (response == null || response.getObject() == null) {
     vclock = null;
     lastmod = null;
     vtag = null;
   } else {
     vclock = response.getObject().getVclock();
     lastmod = response.getObject().getLastmod();
     vtag = response.getObject().getVtag();
   }
 }
示例#2
0
  /* (non-Javadoc)
   * @see com.basho.riak.client.HttpRiakObject#fetch(com.basho.riak.client.request.RequestMeta)
   */
  public FetchResponse fetch(RequestMeta meta) {
    if (riak == null)
      throw new IllegalStateException("Cannot fetch an object without a RiakClient");

    FetchResponse r = riak.fetch(bucket, key, meta);
    if (r.getObject() != null) {
      RiakObject other = r.getObject();
      shallowCopy(other);
      r.setObject(this);
    }
    return r;
  }