Package com.basho.riak.client.core.query

Examples of com.basho.riak.client.core.query.Namespace


   
    @Test
    public void updateParameterizedTypeJSON() throws ExecutionException, InterruptedException, JsonProcessingException
    {
        RiakClient client = new RiakClient(cluster);
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        Location loc = new Location(ns, "test_ORM_key3");
       
        MyUpdate update = new MyUpdate();
        TypeReference<GenericPojo<Integer>> tr =
            new TypeReference<GenericPojo<Integer>>(){};
View Full Code Here


   
    @Test
    public void updateAndResolveParameterizedTypeJSON() throws ExecutionException, InterruptedException
    {
        // We're back to allow_mult=false as default
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        StoreBucketPropsOperation op =
            new StoreBucketPropsOperation.Builder(ns)
                .withAllowMulti(true)
                .build();
        cluster.execute(op);
View Full Code Here

   
    @Test
    public void updateAndResolveParameterizedTypeCustom() throws ExecutionException, InterruptedException
    {
        // We're back to allow_mult=false as default
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        StoreBucketPropsOperation op =
            new StoreBucketPropsOperation.Builder(ns)
                .withAllowMulti(true)
                .build();
        cluster.execute(op);
View Full Code Here

   
    @Test
    public void updateAndResolveRawTypeJSON() throws ExecutionException, InterruptedException, JsonProcessingException
    {
        RiakClient client = new RiakClient(cluster);
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        Location loc = new Location(ns, "test_ORM_key6");
        ConflictResolverFactory.getInstance().registerConflictResolver(Foo.class, new MyFooResolver());
        MyFooUpdate update = new MyFooUpdate();
       
        UpdateValue uv = new UpdateValue.Builder(loc)
View Full Code Here

   
    @Test
    public void updateAndResolveRawTypeCustom() throws ExecutionException, InterruptedException
    {
        RiakClient client = new RiakClient(cluster);
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        Location loc = new Location(ns, "test_ORM_key7");
       
        ConflictResolverFactory.getInstance().registerConflictResolver(Foo.class, new MyFooResolver());
        ConverterFactory.getInstance().registerConverterForClass(Foo.class, new MyFooConverter());
        MyFooUpdate update = new MyFooUpdate();
View Full Code Here

   
    @Test
    public void updateRiakObject() throws ExecutionException, InterruptedException
    {
        RiakClient client = new RiakClient(cluster);
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        Location loc = new Location(ns, "test_ORM_key9");
        UpdateValue uv = new UpdateValue.Builder(loc)
                        .withUpdate(new Update<RiakObject>(){

                                        @Override
View Full Code Here

{
    @Test
    public void simpleTest() throws ExecutionException, InterruptedException
    {
        RiakClient client = new RiakClient(cluster);
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        Location loc = new Location(ns, "test_store_key");
        Pojo pojo = new Pojo();
        pojo.value = "test store value";
        StoreValue sv =
            new StoreValue.Builder(pojo).withLocation(loc)
View Full Code Here

        StoreIndex ssi = new StoreIndex.Builder(index).build();
        client.execute(ssi);
       
        assertTrue("Index not created", assureIndexExists("test_mr_index"));
       
        Namespace ns = new Namespace(bucketType.toString(), mrBucketName);
        StoreBucketProperties sbp = new StoreBucketProperties.Builder(ns)
                                    .withSearchIndex(index.getName())
                                    .build();
        client.execute(sbp);
       
View Full Code Here

    @Before
    public void changeBucketProps() throws ExecutionException, InterruptedException
    {
        if (testBucketType)
        {
            Namespace ns = new Namespace(bucketType.toString(), mrBucketName);
            StoreBucketProperties op = new StoreBucketProperties.Builder(ns).withAllowMulti(false).build();
            client.execute(op);
        }
    }
View Full Code Here

    }
   
    private void initValues(String bucketType) throws InterruptedException
    {
        String keyPrefix = "mr_test_";
        Namespace ns = new Namespace(bucketType, mrBucketName);
        for (int i = 0; i < 200; i++)
        {
            Location loc = new Location(ns, keyPrefix + i);
            RiakObject ro = new RiakObject().setContentType("text/plain")
                .setValue(BinaryValue.create(Integer.toString(i)));
View Full Code Here

TOP

Related Classes of com.basho.riak.client.core.query.Namespace

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.