com.basho.riak.client.builders
Class BucketPropertiesBuilder
java.lang.Object
com.basho.riak.client.builders.BucketPropertiesBuilder
public final class BucketPropertiesBuilder
- extends Object
Used to create instances of BucketProperties
.
All parameters are optional, only nVal has a default value (3)
- Author:
- russell
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BucketPropertiesBuilder
public BucketPropertiesBuilder()
build
public BucketProperties build()
from
public static BucketPropertiesBuilder from(BucketProperties p)
- Parameters:
p
- the BucketProperties to copy to the builder
- Returns:
- a builder with all values set from p
allowSiblings
public BucketPropertiesBuilder allowSiblings(boolean allowSiblings)
lastWriteWins
public BucketPropertiesBuilder lastWriteWins(boolean lastWriteWins)
nVal
public BucketPropertiesBuilder nVal(int nVal)
backend
public BucketPropertiesBuilder backend(String backend)
precommitHooks
public BucketPropertiesBuilder precommitHooks(Collection<NamedFunction> precommitHooks)
addPrecommitHook
public BucketPropertiesBuilder addPrecommitHook(NamedFunction preCommitHook)
postcommitHooks
public BucketPropertiesBuilder postcommitHooks(Collection<NamedErlangFunction> postCommitHooks)
addPostcommitHook
public BucketPropertiesBuilder addPostcommitHook(NamedErlangFunction postcommitHook)
chashKeyFunction
public BucketPropertiesBuilder chashKeyFunction(NamedErlangFunction chashKeyFunction)
linkWalkFunction
public BucketPropertiesBuilder linkWalkFunction(NamedErlangFunction linkWalkFunction)
smallVClock
public BucketPropertiesBuilder smallVClock(int smallVClock)
- Parameters:
smallVClock
-
- Returns:
bigVClock
public BucketPropertiesBuilder bigVClock(int bigVClock)
- Parameters:
bigVClock
-
- Returns:
youngVClock
public BucketPropertiesBuilder youngVClock(long youngVClock)
- Parameters:
youngVClock
-
- Returns:
oldVClock
public BucketPropertiesBuilder oldVClock(long oldVClock)
- Parameters:
oldVClock
-
- Returns:
r
public BucketPropertiesBuilder r(Quora r)
- Parameters:
r
-
- Returns:
r
public BucketPropertiesBuilder r(int r)
r
public BucketPropertiesBuilder r(Quorum r)
w
public BucketPropertiesBuilder w(Quora w)
- Parameters:
w
-
- Returns:
w
public BucketPropertiesBuilder w(int w)
w
public BucketPropertiesBuilder w(Quorum w)
rw
public BucketPropertiesBuilder rw(Quora rw)
- Parameters:
rw
-
- Returns:
rw
public BucketPropertiesBuilder rw(int rw)
rw
public BucketPropertiesBuilder rw(Quorum rw)
dw
public BucketPropertiesBuilder dw(Quora dw)
- Parameters:
dw
-
- Returns:
dw
public BucketPropertiesBuilder dw(int dw)
dw
public BucketPropertiesBuilder dw(Quorum dw)
pr
public BucketPropertiesBuilder pr(Quora pr)
- Parameters:
pr
-
- Returns:
pr
public BucketPropertiesBuilder pr(int pr)
pr
public BucketPropertiesBuilder pr(Quorum pr)
pw
public BucketPropertiesBuilder pw(Quora pw)
- Parameters:
pw
-
- Returns:
pw
public BucketPropertiesBuilder pw(int pw)
pw
public BucketPropertiesBuilder pw(Quorum pw)
basicQuorum
public BucketPropertiesBuilder basicQuorum(boolean basicQuorum)
- Set default basicQuorum value for bucket
- Parameters:
basicQuorum
-
- Returns:
- this
notFoundOK
public BucketPropertiesBuilder notFoundOK(boolean notFoundOK)
- Set default notfound_ok property for bucket
- Parameters:
notFoundOK
-
- Returns:
- this
search
public BucketPropertiesBuilder search(boolean search)
- Enable the bucket for search
- Parameters:
search
-
Copyright © 2012. All Rights Reserved.