Package com.basho.riak.client.core.query

Examples of com.basho.riak.client.core.query.Location


        for (int i = 0; i < 1000; i++)
        {
            semaphore.acquire();
            BinaryValue key = BinaryValue.unsafeCreate((baseKey + i).getBytes());
            RiakObject rObj = new RiakObject().setValue(BinaryValue.create(value));
            Location location = new Location(ns, key);
            StoreOperation storeOp =
                new StoreOperation.Builder(location)
                .withContent(rObj)
                .build();
       
View Full Code Here


        for (BucketKeyInput.IndividualInput i : input.getInputs())
        {

            jg.writeStartArray();

            Location loc = i.location;
            jg.writeString(loc.getNamespace().getBucketNameAsString());
            jg.writeString(loc.getKeyAsString());
            jg.writeObject(i.keyData);

          // TODO: Remove this when bug in Riak is fixed.
          // There's a bug in Riak where if you explicitly specify
            // "default" with the 4 argument version of input, it
            // blows up.
            if (!loc.getNamespace().getBucketTypeAsString().equals(Namespace.DEFAULT_BUCKET_TYPE))
            {
                jg.writeString(loc.getNamespace().getBucketTypeAsString());
            }
            jg.writeEndArray();

        }
View Full Code Here

            {
                throw new IllegalArgumentException("Default bucket type does not accept CRDTs");
            }
           
            // This is simply for the returned query info
            Location loc = new Location(namespace, "RIAK_GENERATED");
           
            reqBuilder.setBucket(ByteString.copyFrom(loc.getNamespace().getBucketName().unsafeGetValue()));
            reqBuilder.setType(ByteString.copyFrom(loc.getNamespace().getBucketType().unsafeGetValue()));
           
            this.location = loc;
           
        }
View Full Code Here

                throw new IllegalArgumentException("Namespace cannot be null");
            }
            reqBuilder.setType(ByteString.copyFrom(namespace.getBucketType().unsafeGetValue()));
            reqBuilder.setBucket(ByteString.copyFrom(namespace.getBucketName().unsafeGetValue()));
           
            this.location = new Location(namespace, "RIAK_GENERATED");
           
        }
View Full Code Here

        public List<Entry> getEntries()
        {
            List<Entry> convertedList = new ArrayList<Entry>();
            for (SecondaryIndexQueryOperation.Response.Entry e : coreResponse.getEntryList())
            {
                Location loc = getLocationFromCoreEntry(e);
                Entry ce = new Entry(loc, e.getIndexKey(), converter);
                convertedList.add(ce);
            }
            return convertedList;
        }
View Full Code Here

        public List<Entry> getEntries()
        {
            List<Entry> convertedList = new ArrayList<Entry>();
            for (SecondaryIndexQueryOperation.Response.Entry e : coreResponse.getEntryList())
            {
                Location loc = getLocationFromCoreEntry(e);
                Entry ce = new Entry(loc, e.getIndexKey(), converter);
                convertedList.add(ce);
            }
            return convertedList;
        }
View Full Code Here

    {
        DtUpdateOperation.Builder builder;
       
        if (key != null)
        {
            Location loc = new Location(namespace, key);
            builder = new DtUpdateOperation.Builder(loc);
        }
        else
        {
            builder = new DtUpdateOperation.Builder(namespace);
View Full Code Here

        public List<Entry> getEntries()
        {
            List<Entry> convertedList = new ArrayList<Entry>();
            for (SecondaryIndexQueryOperation.Response.Entry e : coreResponse.getEntryList())
            {
                Location loc = getLocationFromCoreEntry(e);
                Entry ce = new Entry(loc, e.getIndexKey(), converter);
                convertedList.add(ce);
            }
            return convertedList;
        }
View Full Code Here

        public List<Entry> getEntries()
        {
            List<Entry> convertedList = new ArrayList<Entry>();
            for (SecondaryIndexQueryOperation.Response.Entry e : coreResponse.getEntryList())
            {
                Location loc = getLocationFromCoreEntry(e);
                Entry ce = new Entry(loc, e.getIndexKey(), converter);
                convertedList.add(ce);
            }
            return convertedList;
        }
View Full Code Here

        }
       
       
        protected final Location getLocationFromCoreEntry(SecondaryIndexQueryOperation.Response.Entry e)
        {
            Location loc = new Location(queryLocation, e.getObjectKey());
            return loc;
        }
View Full Code Here

TOP

Related Classes of com.basho.riak.client.core.query.Location

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.