Skip to content

Commit 08e6164

Browse files
committed
Running changes through IntelliJ's formatter. Pedantic whitespace changes only.
1 parent e5a4498 commit 08e6164

8 files changed

Lines changed: 306 additions & 163 deletions

File tree

src/main/java/com/basho/riak/client/api/commands/buckets/FetchBucketProperties.java

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.basho.riak.client.api.AsIsRiakCommand;
2020
import com.basho.riak.client.core.operations.FetchBucketPropsOperation;
2121
import com.basho.riak.client.core.query.Namespace;
22+
2223
import java.util.Objects;
2324

2425
/**
@@ -31,9 +32,11 @@
3132
* FetchBucketProperties fbp = new FetchBucketProperties.Builder(ns).build();
3233
* FetchBucketPropsOperation.Response resp = client.execute(fbp);
3334
* BucketProperties props = resp.getBucketProperties();}</pre>
34-
* Note that this simply returns the core response {@link com.basho.riak.client.core.operations.FetchBucketPropsOperation.Response}
35-
*
35+
* Note that this simply returns the core response
36+
* {@link com.basho.riak.client.core.operations.FetchBucketPropsOperation.Response}
37+
* <p>
3638
* </p>
39+
*
3740
* @author Dave Rusek <drusek at basho dot com>
3841
* @since 2.0
3942
*/
@@ -53,19 +56,26 @@ protected FetchBucketPropsOperation buildCoreOperation()
5356
}
5457

5558
@Override
56-
public boolean equals(Object other) {
57-
if (this == other) {
59+
public boolean equals(Object other)
60+
{
61+
if (this == other)
62+
{
5863
return true;
5964
}
60-
if (!(other instanceof FetchBucketProperties)) {
65+
66+
if (!(other instanceof FetchBucketProperties))
67+
{
6168
return false;
6269
}
70+
6371
FetchBucketProperties otherFetchBucketProperties = (FetchBucketProperties) other;
72+
6473
return Objects.equals(namespace, otherFetchBucketProperties.namespace);
6574
}
6675

6776
@Override
68-
public int hashCode() {
77+
public int hashCode()
78+
{
6979
return Objects.hash(namespace);
7080
}
7181

@@ -78,6 +88,7 @@ public static class Builder
7888

7989
/**
8090
* Construct a Builder for a FetchBucketProperties command.
91+
*
8192
* @param namespace The namespace for the bucket.
8293
*/
8394
public Builder(Namespace namespace)
@@ -91,6 +102,7 @@ public Builder(Namespace namespace)
91102

92103
/**
93104
* Construct a new FetchBucketProperties command.
105+
*
94106
* @return a new FetchBucketProperties command.
95107
*/
96108
public FetchBucketProperties build()

src/main/java/com/basho/riak/client/api/commands/buckets/StoreBucketProperties.java

Lines changed: 79 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.basho.riak.client.core.operations.StoreBucketPropsOperation;
2121
import com.basho.riak.client.core.query.Namespace;
2222
import com.basho.riak.client.core.query.functions.Function;
23+
2324
import java.util.Objects;
2425

2526
/**
@@ -29,11 +30,12 @@
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 (&lt; 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)

src/main/java/com/basho/riak/client/api/commands/search/StoreIndex.java

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.basho.riak.client.api.AsIsRiakCommand;
44
import com.basho.riak.client.core.operations.YzPutIndexOperation;
55
import com.basho.riak.client.core.query.search.YokozunaIndex;
6+
67
import java.util.Objects;
78

89
/**
@@ -38,20 +39,27 @@ protected YzPutIndexOperation buildCoreOperation()
3839
}
3940

4041
@Override
41-
public boolean equals(Object other) {
42-
if (this == other) {
42+
public boolean equals(Object other)
43+
{
44+
if (this == other)
45+
{
4346
return true;
4447
}
45-
if (!(other instanceof StoreIndex)) {
48+
49+
if (!(other instanceof StoreIndex))
50+
{
4651
return false;
4752
}
53+
4854
Builder otherStoreIndex = ((StoreIndex) other).cmdBuilder;
49-
return Objects.equals(cmdBuilder.index, otherStoreIndex.index)
50-
&& Objects.equals(cmdBuilder.timeout, otherStoreIndex.timeout);
55+
56+
return Objects.equals(cmdBuilder.index, otherStoreIndex.index) &&
57+
Objects.equals(cmdBuilder.timeout, otherStoreIndex.timeout);
5158
}
5259

5360
@Override
54-
public int hashCode() {
61+
public int hashCode()
62+
{
5563
return Objects.hash(cmdBuilder.index, cmdBuilder.timeout);
5664
}
5765

@@ -79,6 +87,7 @@ public Builder(YokozunaIndex index)
7987
* By default, riak has a 45s timeout for Yokozuna index creation.
8088
* Setting this value will override that default for this operation.
8189
* </p>
90+
*
8291
* @param timeout the timeout in milliseconds to be sent to riak.
8392
* @return a reference to this object.
8493
*/

src/main/java/com/basho/riak/client/core/query/search/YokozunaIndex.java

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class YokozunaIndex
3030

3131
/**
3232
* Constructs a Yokozuna index without naming the schema.
33-
*
33+
* <p>
3434
* Due to an implementation detail on the Riak side, the index name is restricted
3535
* to US-ASCII characters. The supplied String is converted to bytes
3636
* using the UTF-8 Charset.
@@ -48,7 +48,7 @@ public YokozunaIndex(String name)
4848
* to US-ASCII characters. The supplied String is converted to bytes
4949
* using the UTF-8 Charset.
5050
*
51-
* @param name The name of the index.
51+
* @param name The name of the index.
5252
* @param schema The name of a schema
5353
*/
5454
public YokozunaIndex(String name, String schema)
@@ -91,6 +91,7 @@ public String getName()
9191

9292
/**
9393
* Returns the schema name for this index.
94+
*
9495
* @return The schema name.
9596
*/
9697
public String getSchema()
@@ -119,21 +120,28 @@ public Integer getNVal()
119120
}
120121

121122
@Override
122-
public boolean equals(Object other) {
123-
if (this == other) {
123+
public boolean equals(Object other)
124+
{
125+
if (this == other)
126+
{
124127
return true;
125128
}
126-
if (!(other instanceof YokozunaIndex)) {
129+
130+
if (!(other instanceof YokozunaIndex))
131+
{
127132
return false;
128133
}
134+
129135
YokozunaIndex otherYokozunaIndex = (YokozunaIndex) other;
136+
130137
return Objects.equals(name, otherYokozunaIndex.name) &&
131-
Objects.equals(schema, otherYokozunaIndex.schema) &&
132-
Objects.equals(nVal, otherYokozunaIndex.nVal);
138+
Objects.equals(schema, otherYokozunaIndex.schema) &&
139+
Objects.equals(nVal, otherYokozunaIndex.nVal);
133140
}
134141

135142
@Override
136-
public int hashCode() {
143+
public int hashCode()
144+
{
137145
return Objects.hash(name, schema, nVal);
138146
}
139147
}

0 commit comments

Comments
 (0)