Package com.basho.riak.client.raw

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


    public static IRiakClient newClient(Configuration config) throws RiakException {
        if (config == null) {
            throw new IllegalArgumentException("config cannot be null");
        }

        final RiakClientFactory fac = getFactory(config);
        try {
            return new DefaultRiakClient(fac.newClient(config));
        } catch (IOException e) {
            throw new RiakException(e);
        }
    }
View Full Code Here


     * @throws NoFactoryForConfigException
     *             if a factory cannot be found that accepts the
     *             {@link Configuration} type
     */
    private static RiakClientFactory getFactory(final Configuration config) {
        final RiakClientFactory fac = REGISTRY.get(config.getClass());
        if (fac == null) {
            throw new NoFactoryForConfigException(config.getClass());
        }
        return fac;
    }
View Full Code Here

TOP

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

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.