Package com.basho.riak.client.bucket

Examples of com.basho.riak.client.bucket.Bucket.fetch()


    BasicUser user = null;
   
    Bucket myBucket = null;
        try {
            myBucket = riakClient.fetchBucket("User;" + this.encodeUri(username)).execute();
            user = myBucket.fetch(this.encodeUri(accountName), BasicUser.class).execute();
        } catch (RiakRetryFailedException rrfe) {
            rrfe.printStackTrace();
        } catch (RiakException e) {
            e.printStackTrace();
        }
View Full Code Here


   
    Bucket myBucket = null;
        try {
            myBucket = riakClient.fetchBucket("User;" + this.encodeUri(username)).execute();
            for (String key : myBucket.fetchIndex(BucketIndex.index).withValue("$key").execute()) {
              userList.add(myBucket.fetch(key, BasicUser.class).execute());
            }
        } catch (RiakRetryFailedException rrfe) {
            rrfe.printStackTrace();
        } catch (RiakException e) {
            e.printStackTrace();
View Full Code Here

    BasicSession session = null;
   
    Bucket myBucket = null;
        try {
          myBucket = riakClient.fetchBucket("Session").execute();
            session = myBucket.fetch(this.encodeUri(uuid), BasicSession.class).execute();
        } catch(RiakRetryFailedException rrfe) {
          rrfe.printStackTrace();
        }
       
        return session;
View Full Code Here

    BasicAccessToken session = null;
   
    Bucket myBucket = null;
        try {
          myBucket = riakClient.fetchBucket("AccessToken").execute();
            session = myBucket.fetch(this.encodeUri(accessToken), BasicAccessToken.class).execute();
        } catch(RiakRetryFailedException rrfe) {
          rrfe.printStackTrace();
        }
       
        return session;
View Full Code Here

        Bucket myBucket = null;
        try {
            myBucket = riakClient.fetchBucket("Statistics;" + accountName).execute();

            for (String key : myBucket.fetchIndex(BucketIndex.index).withValue("$key").execute()) {
              statList.add(myBucket.fetch(key, BasicStatistics.class).execute());
            }
        } catch (RiakRetryFailedException rrfe) {
            rrfe.printStackTrace();
        } catch (RiakException e) {
            e.printStackTrace();
View Full Code Here

    BasicStatistics statistics = null;

        Bucket myBucket = null;
        try {
            myBucket = riakClient.fetchBucket("Statistics;" + accountName).execute();
            statistics = myBucket.fetch(guiPath, BasicStatistics.class).execute();
        } catch (RiakRetryFailedException rrfe) {
            rrfe.printStackTrace();
        }

        return statistics;
View Full Code Here

    {
        try
        {

            Bucket bucket = riakClient.fetchBucket( bucketKey ).execute();
            IRiakObject entity = bucket.fetch( entityReference.identity() ).execute();
            if( entity == null )
            {
                throw new EntityNotFoundException( entityReference );
            }
            String jsonState = entity.getValueAsString();
View Full Code Here

                            throws IOException
                        {
                            try
                            {
                                super.close();
                                IRiakObject entity = bucket.fetch( ref.identity() ).execute();
                                if( entity == null )
                                {
                                    throw new EntityNotFoundException( ref );
                                }
                                bucket.store( ref.identity(), toString() ).execute();
View Full Code Here

                public void removeEntity( EntityReference ref, EntityDescriptor entityDescriptor )
                    throws EntityNotFoundException
                {
                    try
                    {
                        IRiakObject entity = bucket.fetch( ref.identity() ).execute();
                        if( entity == null )
                        {
                            throw new EntityNotFoundException( ref );
                        }
                        bucket.delete( ref.identity() ).execute();
View Full Code Here

                        try
                        {
                            final Bucket bucket = riakClient.fetchBucket( bucketKey ).execute();
                            for( String key : bucket.keys() )
                            {
                                String jsonState = bucket.fetch( key ).execute().getValueAsString();
                                receiver.receive( new StringReader( jsonState ) );
                            }
                        }
                        catch( RiakException ex )
                        {
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.