Examples of RiakLink


Examples of com.basho.riak.client.RiakLink

    public static List<RiakLink> parseLinkHeader(String header) {
        List<RiakLink> links = new ArrayList<RiakLink>();
        Map<String, Map<String, String>> parsedLinks = LinkHeader.parse(header);
        for (Entry<String, Map<String, String>> e: parsedLinks.entrySet()) {
          String url = e.getKey();
          RiakLink link = parseOneLink(url, e.getValue());
          if (link != null) {
            links.add(link);
          }
        }
        return links;
View Full Code Here

Examples of com.basho.riak.client.RiakLink

    private static RiakLink parseOneLink(String url, Map<String, String> params) {
        String tag = params.get(Constants.LINK_TAG);
        if (tag != null) {
            String[] parts = url.split("/");
            if (parts.length >= 2)
                return new RiakLink(parts[parts.length - 2], parts[parts.length - 1], tag);
        }
        return null;
    }
View Full Code Here

Examples of com.basho.riak.client.RiakLink

     *            the link tag
     * @return this
     */
    public RiakObjectBuilder addLink(String bucket, String key, String tag) {
        synchronized (links) {
            links.add(new RiakLink(bucket, key, tag));
        }
        return this;
    }
View Full Code Here

Examples of com.basho.riak.client.RiakLink

    /**
     * @param link
     * @return
     */
    private static RiakLink convert(com.basho.riak.pbc.RiakLink link) {
        return new RiakLink(nullSafeToStringUtf8(link.getBucket()), nullSafeToStringUtf8(link.getKey()),
                            nullSafeToStringUtf8(link.getTag()));
    }
View Full Code Here

Examples of com.basho.riak.client.RiakLink

     * @param link
     *            the {@link com.basho.riak.client.http.RiakLink} to convert
     * @return a {@link RiakLink} with the same bucket/key/tag values
     */
    static RiakLink convert(com.basho.riak.client.http.RiakLink link) {
        return new RiakLink(link.getBucket(), link.getKey(), link.getTag());
    }
View Full Code Here

Examples of com.basho.riak.client.RiakLink

    /**
     * @param link
     * @return
     */
    private static RiakLink convert(com.basho.riak.pbc.RiakLink link) {
        return new RiakLink(nullSafeToStringUtf8(link.getBucket()), nullSafeToStringUtf8(link.getKey()),
                            nullSafeToStringUtf8(link.getTag()));
    }
View Full Code Here

Examples of com.basho.riak.client.RiakLink

     * @param link
     *            the {@link com.basho.riak.client.http.RiakLink} to convert
     * @return a {@link RiakLink} with the same bucket/key/tag values
     */
    static RiakLink convert(com.basho.riak.client.http.RiakLink link) {
        return new RiakLink(link.getBucket(), link.getKey(), link.getTag());
    }
View Full Code Here

Examples of com.basho.riak.client.RiakLink

     *            the link tag
     * @return this
     */
    public RiakObjectBuilder addLink(String bucket, String key, String tag) {
        synchronized (links) {
            links.add(new RiakLink(bucket, key, tag));
        }
        return this;
    }
View Full Code Here

Examples of com.basho.riak.client.RiakLink

    public static List<RiakLink> parseLinkHeader(String header) {
        List<RiakLink> links = new ArrayList<RiakLink>();
        Map<String, Map<String, String>> parsedLinks = LinkHeader.parse(header);
        for (Entry<String, Map<String, String>> e: parsedLinks.entrySet()) {
            String url = e.getKey();
            RiakLink link = parseOneLink(url, e.getValue());
            if (link != null) {
                links.add(link);
            }
        }
        return links;
View Full Code Here

Examples of com.basho.riak.client.RiakLink

    private static RiakLink parseOneLink(String url, Map<String, String> params) {
        String tag = params.get(Constants.LINK_TAG);
        if (tag != null) {
            String[] parts = url.split("/");
            if (parts.length >= 2)
                return new RiakLink(parts[parts.length - 2], parts[parts.length - 1], tag);
        }
        return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.