com.basho.riak.client.bucket
Class LazyBucketProperties

java.lang.Object
  extended by com.basho.riak.client.bucket.LazyBucketProperties
All Implemented Interfaces:
BucketProperties

public class LazyBucketProperties
extends Object
implements BucketProperties

A lazy loading BucketProperties. Defers the RawClient.fetchBucket(java.lang.String) call until one of the getters is called. See FetchBucket.lazyLoadBucketProperties() or WriteBucket.lazyLoadBucketProperties()

Since:
1.0.4
Author:
roach

Constructor Summary
LazyBucketProperties(RawClient client, Retrier retrier, String bucket)
           
 
Method Summary
 Boolean getAllowSiblings()
          The allow_mult value for the bucket.
 String getBackend()
          The backend used by this bucket.
 Boolean getBasicQuorum()
          Should a read request return early in some failure cases? E.g.
 Integer getBigVClock()
          the big_vclock property for this bucket.
 NamedErlangFunction getChashKeyFunction()
          The chash_keyfun for this bucket.
 Quorum getDW()
          The default dw quorum for this bucket.
 Boolean getLastWriteWins()
          The last_write_wins value for the bucket.
 NamedErlangFunction getLinkWalkFunction()
          The linkwalk_fun for this bucket.
 Boolean getNotFoundOK()
          True if a vnode returning notfound for a key increments the r tally.
 Integer getNVal()
          This bucket's n_val.
 Long getOldVClock()
          the old_vclock property for this bucket.
 Collection<NamedErlangFunction> getPostcommitHooks()
          The set of postcommit hooks for this bucket.
 Quorum getPR()
          The default pr quorum for this bucket.
 Collection<NamedFunction> getPrecommitHooks()
          The set of precommit_hooks for this bucket.
 Quorum getPW()
          The default pw quorum for this bucket.
 Quorum getR()
          The default r quorum for this bucket.
 Quorum getRW()
          The default rw quorum for this bucket.
 Boolean getSearch()
          The search property
 Integer getSmallVClock()
          the small_vclock property for this bucket.
 Quorum getW()
          The default w quorum for this bucket.
 Long getYoungVClock()
          The young_vclcok property for this bucket.
 boolean isSearchEnabled()
          Is search enabled on this bucket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyBucketProperties

public LazyBucketProperties(RawClient client,
                            Retrier retrier,
                            String bucket)
Parameters:
client - - a RawClient to be used to fetch the bucket properties
retrier - - the Retrier to use
bucketName - - Name of the Riak bucket
Method Detail

getAllowSiblings

public Boolean getAllowSiblings()
Description copied from interface: BucketProperties
The allow_mult value for the bucket.

Specified by:
getAllowSiblings in interface BucketProperties
Returns:
See Also:
BucketProperties.getAllowSiblings()

getLastWriteWins

public Boolean getLastWriteWins()
Description copied from interface: BucketProperties
The last_write_wins value for the bucket.

Specified by:
getLastWriteWins in interface BucketProperties
Returns:
See Also:
BucketProperties.getLastWriteWins()

getNVal

public Integer getNVal()
Description copied from interface: BucketProperties
This bucket's n_val.

Specified by:
getNVal in interface BucketProperties
Returns:
See Also:
BucketProperties.getNVal()

getBackend

public String getBackend()
Description copied from interface: BucketProperties
The backend used by this bucket.

Specified by:
getBackend in interface BucketProperties
Returns:
See Also:
BucketProperties.getBackend()

getSmallVClock

public Integer getSmallVClock()
Description copied from interface: BucketProperties
the small_vclock property for this bucket. See controlling vector clock growth for details.

Specified by:
getSmallVClock in interface BucketProperties
Returns:
See Also:
BucketProperties.getSmallVClock()

getBigVClock

public Integer getBigVClock()
Description copied from interface: BucketProperties
the big_vclock property for this bucket. See controlling vector clock growth for details.

Specified by:
getBigVClock in interface BucketProperties
Returns:
See Also:
BucketProperties.getBigVClock()

getYoungVClock

public Long getYoungVClock()
Description copied from interface: BucketProperties
The young_vclcok property for this bucket. See controlling vector clock growth for details.

Specified by:
getYoungVClock in interface BucketProperties
Returns:
See Also:
BucketProperties.getYoungVClock()

getOldVClock

public Long getOldVClock()
Description copied from interface: BucketProperties
the old_vclock property for this bucket. See controlling vector clock growth for details.

Specified by:
getOldVClock in interface BucketProperties
Returns:
See Also:
BucketProperties.getOldVClock()

getPrecommitHooks

public Collection<NamedFunction> getPrecommitHooks()
Description copied from interface: BucketProperties
The set of precommit_hooks for this bucket. See pre and post commit hooks for more details.

Specified by:
getPrecommitHooks in interface BucketProperties
Returns:
See Also:
BucketProperties.getPrecommitHooks()

getPostcommitHooks

public Collection<NamedErlangFunction> getPostcommitHooks()
Description copied from interface: BucketProperties
The set of postcommit hooks for this bucket. See pre and post commit hooks for more details.

Specified by:
getPostcommitHooks in interface BucketProperties
Returns:
See Also:
BucketProperties.getPostcommitHooks()

getR

public Quorum getR()
Description copied from interface: BucketProperties
The default r quorum for this bucket.

Specified by:
getR in interface BucketProperties
Returns:
See Also:
BucketProperties.getR()

getW

public Quorum getW()
Description copied from interface: BucketProperties
The default w quorum for this bucket.

Specified by:
getW in interface BucketProperties
Returns:
See Also:
BucketProperties.getW()

getRW

public Quorum getRW()
Description copied from interface: BucketProperties
The default rw quorum for this bucket.

Specified by:
getRW in interface BucketProperties
Returns:
See Also:
BucketProperties.getRW()

getDW

public Quorum getDW()
Description copied from interface: BucketProperties
The default dw quorum for this bucket.

Specified by:
getDW in interface BucketProperties
Returns:
See Also:
BucketProperties.getDW()

getPR

public Quorum getPR()
Description copied from interface: BucketProperties
The default pr quorum for this bucket.

Specified by:
getPR in interface BucketProperties
Returns:
See Also:
BucketProperties.getPR()

getPW

public Quorum getPW()
Description copied from interface: BucketProperties
The default pw quorum for this bucket.

Specified by:
getPW in interface BucketProperties
Returns:
See Also:
BucketProperties.getPW()

getBasicQuorum

public Boolean getBasicQuorum()
Description copied from interface: BucketProperties
Should a read request return early in some failure cases? E.g. If a quorum of nodes has already returned notfound/error, don't wait around for the rest.

Specified by:
getBasicQuorum in interface BucketProperties
Returns:
See Also:
BucketProperties.getBasicQuorum()

getNotFoundOK

public Boolean getNotFoundOK()
Description copied from interface: BucketProperties
True if a vnode returning notfound for a key increments the r tally. False is higher consistency, true is higher availability.

Specified by:
getNotFoundOK in interface BucketProperties
Returns:
See Also:
BucketProperties.getNotFoundOK()

getChashKeyFunction

public NamedErlangFunction getChashKeyFunction()
Description copied from interface: BucketProperties
The chash_keyfun for this bucket.

Specified by:
getChashKeyFunction in interface BucketProperties
Returns:
See Also:
BucketProperties.getChashKeyFunction()

getLinkWalkFunction

public NamedErlangFunction getLinkWalkFunction()
Description copied from interface: BucketProperties
The linkwalk_fun for this bucket.

Specified by:
getLinkWalkFunction in interface BucketProperties
Returns:
See Also:
BucketProperties.getLinkWalkFunction()

getSearch

public Boolean getSearch()
Description copied from interface: BucketProperties
The search property

Specified by:
getSearch in interface BucketProperties
Returns:
See Also:
BucketProperties.getSearch()

isSearchEnabled

public boolean isSearchEnabled()
Description copied from interface: BucketProperties
Is search enabled on this bucket

Specified by:
isSearchEnabled in interface BucketProperties
Returns:
See Also:
BucketProperties.isSearchEnabled()


Copyright © 2012. All Rights Reserved.