Package com.basho.riak.client.core.util

Examples of com.basho.riak.client.core.util.BinaryValue


                    if (coreResponse.hasCrdtElement())
                    {
                        RiakDatatype element = coreResponse.getCrdtElement();
                        set = element.getAsSet();
                    }
                    BinaryValue returnedKey = coreResponse.hasGeneratedKey()
                        ? coreResponse.getGeneratedKey()
                        : null;
                    Context returnedCtx = null;
                    if (coreResponse.hasContext())
                    {
View Full Code Here


                    if (coreResponse.hasCrdtElement())
                    {
                        RiakDatatype element = coreResponse.getCrdtElement();
                        counter = element.getAsCounter();
                    }
                    BinaryValue returnedKey = coreResponse.hasGeneratedKey()
                        ? coreResponse.getGeneratedKey()
                        : null;
                   
                    Context returnedCtx = null;
                    if (coreResponse.hasContext())
View Full Code Here

        Response.Builder responseBuilder = new Response.Builder()
            .withCrdtElement(element);

        if (response.hasContext())
        {
            BinaryValue ctxWrapper = BinaryValue.create(response.getContext().toByteArray());
            responseBuilder.withContext(ctxWrapper);
        }

        return responseBuilder.build();
View Full Code Here

    }

    @Override
    public Location next()
    {
      BinaryValue key = iterator.next();
      return new Location(namespace, key);
    }
View Full Code Here

     * @param key the key for the user metadata entry as a {@code String} encoded using the supplied {@code Charset
     * @return the value for the entry converted to a {@code String} using the supplied {@code Charset}
     */
    public String get(String key, Charset charset)
    {
        BinaryValue wrappedKey = BinaryValue.unsafeCreate(key.getBytes(charset));
        BinaryValue value = meta.get(wrappedKey);
        if (value != null)
        {
            return value.toString(charset);
        }
        else
        {
            return null;
        }
View Full Code Here

     * @param key the key for the user metadata entry as a {@code String} encoded using the supplied {@code Charset}
     * @param value the value for the entry as a {@code String} encoded using the supplied {@code Charset}
     */
    public void put(String key, String value, Charset charset)
    {
        BinaryValue wrappedKey = BinaryValue.unsafeCreate(key.getBytes(charset));
        BinaryValue wrappedValue = BinaryValue.unsafeCreate(value.getBytes(charset));
        meta.put(wrappedKey, wrappedValue);
    }
View Full Code Here

        meta.remove(key);
    }
   
    public void remove(String key, Charset charset)
    {
        BinaryValue wrappedKey = BinaryValue.unsafeCreate(key.getBytes(charset));
        remove(wrappedKey);
    }
View Full Code Here

    // TODO: deal with charset. Should add to annotation
    public RiakUserMetadata put(Map<String,String> metaMap)
    {
        for (Map.Entry<String,String> e : metaMap.entrySet())
        {
            BinaryValue wrappedKey = BinaryValue.unsafeCreate(e.getKey().getBytes());
            BinaryValue wrappedValue = BinaryValue.unsafeCreate(e.getValue().getBytes());
            meta.put(wrappedKey, wrappedValue);
        }
        return this;
    }
View Full Code Here

                    if (coreResponse.hasCrdtElement())
                    {
                        RiakDatatype element = coreResponse.getCrdtElement();
                        map = element.getAsMap();
                    }
                    BinaryValue returnedKey = coreResponse.hasGeneratedKey()
                        ? coreResponse.getGeneratedKey()
                        : null;
                   
                    Context returnedCtx = null;
                    if (coreResponse.hasContext())
View Full Code Here

  @Override
  protected RiakFuture<Response, BinaryValue> executeAsync(RiakCluster cluster)
  {
   
        BinaryValue jobSpec;
    try
    {
      String spec = writeSpec();
            //System.out.println(spec);
            jobSpec = BinaryValue.create(spec);
View Full Code Here

TOP

Related Classes of com.basho.riak.client.core.util.BinaryValue

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.