Examples of RiakClientFactory


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

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

     * @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
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.