Package com.basho.riak.client

Examples of com.basho.riak.client.RiakObject


                        partBucket = locationParts[locationParts.length - 2];
                        partKey = locationParts[locationParts.length - 1];
                    }
                }

                RiakObject o = new RiakObject(riak, partBucket, partKey, part.getBody(),
                                              headers.get(Constants.HDR_CONTENT_TYPE), links, usermeta, vclock,
                                              headers.get(Constants.HDR_LAST_MODIFIED), headers.get(Constants.HDR_ETAG));
                objects.add(o);
            }
        }
View Full Code Here


                siblings = ClientUtils.parseMultipart(riak, r.getBucket(), r.getKey(), headers, r.getBodyAsString());
            }

            object = siblings.iterator().next();
        } else if (r.isSuccess()) {
            object = new RiakObject(riak, r.getBucket(), r.getKey(), r.getBody(),
                                    headers.get(Constants.HDR_CONTENT_TYPE), links, usermeta,
                                    headers.get(Constants.HDR_VCLOCK), headers.get(Constants.HDR_LAST_MODIFIED),
                                    headers.get(Constants.HDR_ETAG));

            Long contentLength = null;
View Full Code Here

                        partBucket = locationParts[locationParts.length - 2];
                        partKey = locationParts[locationParts.length - 1];
                    }
                }

                RiakObject o = new RiakObject(riak, partBucket, partKey, part.getBody(),
                                              headers.get(Constants.HDR_CONTENT_TYPE), links, usermeta, vclock,
                                              headers.get(Constants.HDR_LAST_MODIFIED), headers.get(Constants.HDR_ETAG));
                objects.add(o);
            }
        }
View Full Code Here

                siblings = ClientUtils.parseMultipart(riak, r.getBucket(), r.getKey(), headers, r.getBody());
            }

            object = siblings.iterator().next();
        } else if (r.isSuccess()) {
            object = new RiakObject(riak, r.getBucket(), r.getKey(), r.getBody(),
                                    headers.get(Constants.HDR_CONTENT_TYPE), links, usermeta,
                                    headers.get(Constants.HDR_VCLOCK), headers.get(Constants.HDR_LAST_MODIFIED),
                                    headers.get(Constants.HDR_ETAG));

            Long contentLength = null;
View Full Code Here

                    partBucket = locationParts[locationParts.length - 2];
                    partKey = locationParts[locationParts.length - 1];
                }
            }

            RiakObject o = new RiakObject(riak, partBucket, partKey, null, headers.get(Constants.HDR_CONTENT_TYPE),
                                 links, usermeta, vclock, headers.get(Constants.HDR_LAST_MODIFIED),
                                 headers.get(Constants.HDR_ETAG));
            o.setValueStream(part.getStream());
            cache(o);
            return true;
        }

        return false;
View Full Code Here

                        partBucket = locationParts[locationParts.length - 2];
                        partKey = locationParts[locationParts.length - 1];
                    }
                }

                RiakObject o = new RiakObject(riak, partBucket, partKey, part.getBody(),
                                              headers.get(Constants.HDR_CONTENT_TYPE), links, usermeta, vclock,
                                              headers.get(Constants.HDR_LAST_MODIFIED), headers.get(Constants.HDR_ETAG));
                objects.add(o);
            }
        }
View Full Code Here

        final String key = (String) parameters[0];
        final RequestMeta meta = new RequestMeta ();
        meta.setClientId (RiakRestOperationFactory.this.clientId);
        meta.setAccept (Constants.CTYPE_ANY + ", " + Constants.CTYPE_MULTIPART_MIXED);
        final FetchResponse res = RiakRestOperationFactory.this.riakcl.fetch (RiakRestOperationFactory.this.bucket, key, meta);
        final RiakObject riakobj;
        if (res.hasSiblings ()) {
          RiakObject oldest = null;
          long oldestMod = Long.MIN_VALUE;
          for (final RiakObject sibling : res.getSiblings ()) {
            final long siblingMod = sibling.getLastmodAsDate ().getTime ();
            if (siblingMod >= oldestMod) {
              oldest = sibling;
View Full Code Here

      @Override
      public Boolean call ()
      {
        final String key = (String) parameters[0];
        final byte[] dataBytes = (byte[]) parameters[1];
        final RiakObject riakobj = new RiakObject (RiakRestOperationFactory.this.bucket, key, dataBytes);
        final RequestMeta meta = new RequestMeta ();
        meta.setClientId (RiakRestOperationFactory.this.clientId);
        final StoreResponse response = RiakRestOperationFactory.this.riakcl.store (riakobj, meta);
        if (response.isSuccess ()) {
          return true;
View Full Code Here

                        partBucket = locationParts[locationParts.length - 2];
                        partKey = locationParts[locationParts.length - 1];
                    }
                }

                RiakObject o = new RiakObject(riak, partBucket, partKey, part.getBody(),
                                              headers.get(Constants.HDR_CONTENT_TYPE), links, usermeta, vclock,
                                              headers.get(Constants.HDR_LAST_MODIFIED), headers.get(Constants.HDR_ETAG));
                objects.add(o);
            }
        }
View Full Code Here

                        partBucket = locationParts[locationParts.length - 2];
                        partKey = locationParts[locationParts.length - 1];
                    }
                }

                RiakObject o = new RiakObject(riak, partBucket, partKey, part.getBody(),
                                              headers.get(Constants.HDR_CONTENT_TYPE), links, usermeta, vclock,
                                              headers.get(Constants.HDR_LAST_MODIFIED), headers.get(Constants.HDR_ETAG));
                objects.add(o);
            }
        }
View Full Code Here

TOP

Related Classes of com.basho.riak.client.RiakObject

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.