T
- the type of the DomainBucket to be builtpublic class DomainBucketBuilder<T> extends Object
DomainBucket
Defaults are as follows:
ConflictResolver
: DefaultResolver
Converter
: JSONConverter
Retrier
: DefaultRetrier.attempts(int)
configured for 3 attempts MutationProducer
: anonymous instance that produces a ClobberMutation
for MutationProducer.produce(Object)
Constructor and Description |
---|
DomainBucketBuilder(Bucket bucket,
Class<T> clazz)
|
Modifier and Type | Method and Description |
---|---|
DomainBucketBuilder<T> |
basicQuorum(boolean basicQuorum) |
DomainBucket<T> |
build()
Generate the
DomainBucket |
DomainBucketBuilder<T> |
dw(int dw)
The durable write quorum for store operations on the built
DomainBucket |
DomainBucketBuilder<T> |
dw(Quora dw)
The durable write quorum for store operations on the built
DomainBucket |
DomainBucketBuilder<T> |
ifNoneMatch(boolean ifNoneMatch) |
DomainBucketBuilder<T> |
ifNotModified(boolean ifNotModified) |
DomainBucketBuilder<T> |
mutationProducer(MutationProducer<T> mutationProducer)
A
MutationProducer to provide the Mutation to use in store operations. |
DomainBucketBuilder<T> |
notFoundOK(boolean notFoundOK) |
DomainBucketBuilder<T> |
pr(int pr) |
DomainBucketBuilder<T> |
pr(Quora pr) |
DomainBucketBuilder<T> |
pw(int pw) |
DomainBucketBuilder<T> |
pw(Quora pw) |
DomainBucketBuilder<T> |
r(int r)
The read quorum for fetch/store operations on the built
DomainBucket |
DomainBucketBuilder<T> |
r(Quora r)
The read quorum for fetch/store operations on the built
DomainBucket |
DomainBucketBuilder<T> |
retrier(Retrier retrier)
The
Retrier to use on operations on the built DomainBucket |
DomainBucketBuilder<T> |
returnBody(boolean returnBody)
Should store operations on the built
DomainBucket return a body? |
DomainBucketBuilder<T> |
returnDeletedVClock(boolean returnDeletedVClock) |
DomainBucketBuilder<T> |
rw(int rw)
The read write quorum for delete operations on the built
DomainBucket |
DomainBucketBuilder<T> |
rw(Quora rw)
The read write quorum for delete operations on the built
DomainBucket |
DomainBucketBuilder<T> |
timeout(int timeout)
Set an operation timeout in milliseconds to be sent to Riak
As of 1.4 Riak allows a timeout to be sent for get, put, and delete operations.
|
DomainBucketBuilder<T> |
w(int w)
The write quorum for store operations on the built
DomainBucket |
DomainBucketBuilder<T> |
w(Quora w)
The write quorum for store operations on the built
DomainBucket |
DomainBucketBuilder<T> |
withConverter(Converter<T> converter)
The
Converter to use on fetch and store operations on the built DomainBucket |
DomainBucketBuilder<T> |
withoutFetch(boolean withoutFetch)
Sets whether a store operation should fetch existing value(s) from Riak
(and the vector clock) and perform conflict resolution if required.
|
DomainBucketBuilder<T> |
withResolver(ConflictResolver<T> resolver)
the
ConflictResolver the DomainBucket will use. |
public DomainBucket<T> build()
DomainBucket
DomainBucket
configured from this builderpublic DomainBucketBuilder<T> withResolver(ConflictResolver<T> resolver)
ConflictResolver
the DomainBucket
will use.resolver
- a ConflictResolver
public DomainBucketBuilder<T> returnBody(boolean returnBody)
DomainBucket
return a body?returnBody
- public DomainBucketBuilder<T> retrier(Retrier retrier)
Retrier
to use on operations on the built DomainBucket
retrier
- a Retrier
public DomainBucketBuilder<T> w(int w)
DomainBucket
w
- public DomainBucketBuilder<T> w(Quora w)
DomainBucket
w
- - Quora
to use.public DomainBucketBuilder<T> r(int r)
DomainBucket
r
- public DomainBucketBuilder<T> r(Quora r)
DomainBucket
r
- - Quora
to usepublic DomainBucketBuilder<T> rw(int rw)
DomainBucket
rw
- public DomainBucketBuilder<T> rw(Quora rw)
DomainBucket
rw
- - Quora
to usepublic DomainBucketBuilder<T> dw(int dw)
DomainBucket
dw
- public DomainBucketBuilder<T> dw(Quora dw)
DomainBucket
dw
- - Quora
to usepublic DomainBucketBuilder<T> notFoundOK(boolean notFoundOK)
notFoundOK
- public DomainBucketBuilder<T> basicQuorum(boolean basicQuorum)
basicQuorum
- public DomainBucketBuilder<T> returnDeletedVClock(boolean returnDeletedVClock)
returnDeletedVClock
- public DomainBucketBuilder<T> ifNotModified(boolean ifNotModified)
ifNotModified
- public DomainBucketBuilder<T> ifNoneMatch(boolean ifNoneMatch)
ifNoneMatch
- public DomainBucketBuilder<T> pr(int pr)
pr
- public DomainBucketBuilder<T> pr(Quora pr)
pr
- - Quora
to usepublic DomainBucketBuilder<T> pw(int pw)
pw
- public DomainBucketBuilder<T> pw(Quora pw)
pw
- - Quora
to usepublic DomainBucketBuilder<T> timeout(int timeout)
timeout
- - the timeout in millisecondspublic DomainBucketBuilder<T> mutationProducer(MutationProducer<T> mutationProducer)
MutationProducer
to provide the Mutation
to use in store operations.mutationProducer
- public DomainBucketBuilder<T> withConverter(Converter<T> converter)
Converter
to use on fetch and store operations on the built DomainBucket
converter
- public DomainBucketBuilder<T> withoutFetch(boolean withoutFetch)
withoutFetch
- StoreObject.withoutFetch()
Copyright © 2013. All Rights Reserved.