2020import com .basho .riak .client .core .operations .StoreBucketPropsOperation ;
2121import com .basho .riak .client .core .query .Namespace ;
2222import com .basho .riak .client .core .query .functions .Function ;
23+
2324import java .util .Objects ;
2425
2526/**
2930 * {@code
3031 * Namespace ns = new Namespace("my_type", "my_bucket");
3132 * StoreBucketProperties sbp =
32- * new StoreBucketProperties.Builder(ns)
33- * .withAllowMulti(true)
34- * .build();
33+ * new StoreBucketProperties.Builder(ns)
34+ * .withAllowMulti(true)
35+ * .build();
3536 * client.execute(sbp);}</pre>
3637 * </p>
38+ *
3739 * @author Dave Rusek <drusek at basho dot com>
3840 * @since 2.0
3941 */
@@ -95,8 +97,7 @@ public final class StoreBucketProperties extends AsIsRiakCommand<Void, Namespace
9597 @ Override
9698 protected StoreBucketPropsOperation buildCoreOperation ()
9799 {
98- StoreBucketPropsOperation .Builder builder =
99- new StoreBucketPropsOperation .Builder (namespace );
100+ StoreBucketPropsOperation .Builder builder = new StoreBucketPropsOperation .Builder (namespace );
100101
101102 if (allowMulti != null )
102103 {
@@ -217,45 +218,73 @@ protected StoreBucketPropsOperation buildCoreOperation()
217218 }
218219
219220 @ Override
220- public boolean equals (Object other ) {
221- if (this == other ) {
221+ public boolean equals (Object other )
222+ {
223+ if (this == other )
224+ {
222225 return true ;
223226 }
224- if (!(other instanceof StoreBucketProperties )) {
227+
228+ if (!(other instanceof StoreBucketProperties ))
229+ {
225230 return false ;
226231 }
232+
227233 StoreBucketProperties otherStoreBucketProperties = (StoreBucketProperties ) other ;
234+
228235 return Objects .equals (namespace , otherStoreBucketProperties .namespace ) &&
229- Objects .equals (allowMulti , otherStoreBucketProperties .allowMulti ) &&
230- Objects .equals (backend , otherStoreBucketProperties .backend ) &&
231- Objects .equals (basicQuorum , otherStoreBucketProperties .basicQuorum ) &&
232- Objects .equals (bigVClock , otherStoreBucketProperties .bigVClock ) &&
233- Objects .equals (chashkeyFunction , otherStoreBucketProperties .chashkeyFunction ) &&
234- Objects .equals (lastWriteWins , otherStoreBucketProperties .lastWriteWins ) &&
235- Objects .equals (linkWalkFunction , otherStoreBucketProperties .linkWalkFunction ) &&
236- Objects .equals (rw , otherStoreBucketProperties .rw ) &&
237- Objects .equals (dw , otherStoreBucketProperties .dw ) &&
238- Objects .equals (w , otherStoreBucketProperties .w ) &&
239- Objects .equals (r , otherStoreBucketProperties .r ) &&
240- Objects .equals (pr , otherStoreBucketProperties .pr ) &&
241- Objects .equals (pw , otherStoreBucketProperties .pw ) &&
242- Objects .equals (notFoundOk , otherStoreBucketProperties .notFoundOk ) &&
243- Objects .equals (preCommitHook , otherStoreBucketProperties .preCommitHook ) &&
244- Objects .equals (postCommitHook , otherStoreBucketProperties .postCommitHook ) &&
245- Objects .equals (oldVClock , otherStoreBucketProperties .oldVClock ) &&
246- Objects .equals (youngVClock , otherStoreBucketProperties .youngVClock ) &&
247- Objects .equals (smallVClock , otherStoreBucketProperties .smallVClock ) &&
248- Objects .equals (nval , otherStoreBucketProperties .nval ) &&
249- Objects .equals (legacySearch , otherStoreBucketProperties .legacySearch ) &&
250- Objects .equals (searchIndex , otherStoreBucketProperties .searchIndex ) &&
251- Objects .equals (hllPrecision , otherStoreBucketProperties .hllPrecision );
236+ Objects .equals (allowMulti , otherStoreBucketProperties .allowMulti ) &&
237+ Objects .equals (backend , otherStoreBucketProperties .backend ) &&
238+ Objects .equals (basicQuorum , otherStoreBucketProperties .basicQuorum ) &&
239+ Objects .equals (bigVClock , otherStoreBucketProperties .bigVClock ) &&
240+ Objects .equals (chashkeyFunction , otherStoreBucketProperties .chashkeyFunction ) &&
241+ Objects .equals (lastWriteWins , otherStoreBucketProperties .lastWriteWins ) &&
242+ Objects .equals (linkWalkFunction , otherStoreBucketProperties .linkWalkFunction ) &&
243+ Objects .equals (rw , otherStoreBucketProperties .rw ) &&
244+ Objects .equals (dw , otherStoreBucketProperties .dw ) &&
245+ Objects .equals (w , otherStoreBucketProperties .w ) &&
246+ Objects .equals (r , otherStoreBucketProperties .r ) &&
247+ Objects .equals (pr , otherStoreBucketProperties .pr ) &&
248+ Objects .equals (pw , otherStoreBucketProperties .pw ) &&
249+ Objects .equals (notFoundOk , otherStoreBucketProperties .notFoundOk ) &&
250+ Objects .equals (preCommitHook , otherStoreBucketProperties .preCommitHook ) &&
251+ Objects .equals (postCommitHook , otherStoreBucketProperties .postCommitHook ) &&
252+ Objects .equals (oldVClock , otherStoreBucketProperties .oldVClock ) &&
253+ Objects .equals (youngVClock , otherStoreBucketProperties .youngVClock ) &&
254+ Objects .equals (smallVClock , otherStoreBucketProperties .smallVClock ) &&
255+ Objects .equals (nval , otherStoreBucketProperties .nval ) &&
256+ Objects .equals (legacySearch , otherStoreBucketProperties .legacySearch ) &&
257+ Objects .equals (searchIndex , otherStoreBucketProperties .searchIndex ) &&
258+ Objects .equals (hllPrecision , otherStoreBucketProperties .hllPrecision );
252259 }
253260
254261 @ Override
255- public int hashCode () {
256- return Objects .hash (namespace , allowMulti , backend , basicQuorum , bigVClock , chashkeyFunction , lastWriteWins ,
257- linkWalkFunction , rw , dw , w , r , pr , pw , notFoundOk , preCommitHook , postCommitHook , oldVClock ,
258- youngVClock , smallVClock , nval , legacySearch , searchIndex , hllPrecision );
262+ public int hashCode ()
263+ {
264+ return Objects .hash (namespace ,
265+ allowMulti ,
266+ backend ,
267+ basicQuorum ,
268+ bigVClock ,
269+ chashkeyFunction ,
270+ lastWriteWins ,
271+ linkWalkFunction ,
272+ rw ,
273+ dw ,
274+ w ,
275+ r ,
276+ pr ,
277+ pw ,
278+ notFoundOk ,
279+ preCommitHook ,
280+ postCommitHook ,
281+ oldVClock ,
282+ youngVClock ,
283+ smallVClock ,
284+ nval ,
285+ legacySearch ,
286+ searchIndex ,
287+ hllPrecision );
259288 }
260289
261290 public static class Builder
@@ -325,7 +354,7 @@ public Builder withBackend(String backend)
325354
326355 /**
327356 * Set the basic_quorum value.
328- *
357+ * <p>
329358 * The parameter controls whether a read request should return early in
330359 * some fail cases. E.g. If a quorum of nodes has already returned
331360 * notfound/error, don't wait around for the rest.
@@ -344,7 +373,9 @@ public Builder withBasicQuorum(boolean use)
344373 *
345374 * @param bigVClock a long representing a epoch time value.
346375 * @return a reference to this object.
347- * @see <a href="http://docs.basho.com/riak/latest/theory/concepts/Vector-Clocks/#Vector-Clock-Pruning">Vector Clock Pruning</a>
376+ * @see
377+ * <a href="http://docs.basho.com/riak/latest/theory/concepts/Vector-Clocks/#Vector-Clock-Pruning">Vector
378+ * Clock Pruning</a>
348379 */
349380 public Builder withBigVClock (Long bigVClock )
350381 {
@@ -518,7 +549,9 @@ public Builder withPostcommitHook(Function hook)
518549 *
519550 * @param oldVClock an long representing a epoch time value.
520551 * @return a reference to this object.
521- * @see <a href="http://docs.basho.com/riak/latest/theory/concepts/Vector-Clocks/#Vector-Clock-Pruning">Vector Clock Pruning</a>
552+ * @see
553+ * <a href="http://docs.basho.com/riak/latest/theory/concepts/Vector-Clocks/#Vector-Clock-Pruning">Vector
554+ * Clock Pruning</a>
522555 */
523556 public Builder withOldVClock (Long oldVClock )
524557 {
@@ -531,7 +564,9 @@ public Builder withOldVClock(Long oldVClock)
531564 *
532565 * @param youngVClock a long representing a epoch time value.
533566 * @return a reference to this object.
534- * @see <a href="http://docs.basho.com/riak/latest/theory/concepts/Vector-Clocks/#Vector-Clock-Pruning">Vector Clock Pruning</a>
567+ * @see
568+ * <a href="http://docs.basho.com/riak/latest/theory/concepts/Vector-Clocks/#Vector-Clock-Pruning">Vector
569+ * Clock Pruning</a>
535570 */
536571 public Builder withYoungVClock (Long youngVClock )
537572 {
@@ -544,7 +579,9 @@ public Builder withYoungVClock(Long youngVClock)
544579 *
545580 * @param smallVClock a long representing a epoch time value.
546581 * @return a reference to this object.
547- * @see <a href="http://docs.basho.com/riak/latest/theory/concepts/Vector-Clocks/#Vector-Clock-Pruning">Vector Clock Pruning</a>
582+ * @see
583+ * <a href="http://docs.basho.com/riak/latest/theory/concepts/Vector-Clocks/#Vector-Clock-Pruning">Vector
584+ * Clock Pruning</a>
548585 */
549586 public Builder withSmallVClock (Long smallVClock )
550587 {
@@ -571,11 +608,11 @@ public Builder withNVal(int nVal)
571608 /**
572609 * Enable Legacy Riak Search. Setting this to true causes the search
573610 * pre-commit hook to be added.
574- *
611+ * <p>
575612 * <b>Note this is only for legacy Riak (< v2.0) Search support.</b>
576613 *
577614 * @param enable add/remove (true/false) the pre-commit hook for Legacy
578- * Riak Search.
615+ * Riak Search.
579616 * @return a reference to this object.
580617 */
581618 public Builder withLegacyRiakSearchEnabled (boolean enable )
0 commit comments