Package com.basho.riak.client.raw

Examples of com.basho.riak.client.raw.RawClient


     * @throws RiakException
     */
    public static IRiakClient pbcClient() throws RiakException {

        try {
            final RawClient client = new PBClientAdapter("127.0.0.1", 8087);

            return new DefaultRiakClient(client);
        } catch (IOException e) {
            throw new RiakException(e);
        }
View Full Code Here


     * @throws RiakException
     */
    public static IRiakClient pbcClient(String host, int port) throws RiakException {

        try {
            final RawClient client = new PBClientAdapter(host, port);

            return new DefaultRiakClient(client);
        } catch (IOException e) {
            throw new RiakException(e);
        }
View Full Code Here

     * Wraps the given {@link RiakClient} client in a {@link DefaultRiakClient}.
     * @param delegate the pbc.{@link RiakClient} to wrap.
     * @return a {@link DefaultRiakClient} that delegates to <code>delegate</code>
     */
    public static IRiakClient pbcClient(com.basho.riak.pbc.RiakClient delegate) {
        final RawClient client = new PBClientAdapter(delegate);
        return new DefaultRiakClient(client);
    }
View Full Code Here

    /**
     * Wraps a {@link HTTPClientAdapter} connecting to 127.0.0.1:8098/riak in a {@link DefaultRiakClient}
     * @return a default configuration {@link DefaultRiakClient} delegating to the HTTP client
     */
    public static IRiakClient httpClient() throws RiakException {
        final RawClient client = new HTTPClientAdapter(DEFAULT_RIAK_URL);
        return new DefaultRiakClient(client);
    }
View Full Code Here

     *            a String of the url for Riak's REST iterface
     * @return a default configuration {@link DefaultRiakClient} delegating to
     *         the HTTP client
     */
    public static IRiakClient httpClient(String url) throws RiakException {
        final RawClient client = new HTTPClientAdapter(url);
        return new DefaultRiakClient(client);
    }
View Full Code Here

     * Wraps the given {@link com.basho.riak.client.http.RiakClient} in a {@link DefaultRiakClient}
     * @param delegate the http.{@link com.basho.riak.client.http.RiakClient} to wrap.
     * @return a {@link DefaultRiakClient} that delegates to <code>delegate</code>
     */
    public static IRiakClient httpClient(com.basho.riak.client.http.RiakClient delegate) throws RiakException {
        final RawClient client = new HTTPClientAdapter(delegate);
        return new DefaultRiakClient(client);
    }
View Full Code Here

        }
        return client;
    }

    public static RawClient getRawClient(RiakLocation location) throws IOException {
        RawClient client = null;
        switch (location.getTransport()) {
        case PB:
            client = new PBClientAdapter(location.getHost(), location.getPort());
            break;
        case HTTP:
View Full Code Here

TOP

Related Classes of com.basho.riak.client.raw.RawClient

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.