best practices to work with buckets in java-client

Guido Medina guido.medina at temetra.com
Fri Feb 15 18:30:30 EST 2013


I would say it is totally safe to treat them as singleton (static 
reference or just singleton pattern), we have been doing that for a year 
with no issues so far.

Hope that helps,

Guido.

On 15/02/13 22:07, Mikhail Tyamin wrote:
> Hello guys,
>
> what is the best way to work with Bucket object in java-client?
>
> Can I create it once (on application's start) and store somewhere (like static field for example)
> or I should create it ( riakClient.createBucket("bucketName") ) once and then fetch it  ( riakClient.fetchBucket("bucketName") )
> every time using riakClient when I need it?
>
> P.S. I am going to use the same bucket's properties (nVal, allowSiblings and etc.) during all life of application.
>
> Thank you.
>
> Mikhail.
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com





More information about the riak-users mailing list