Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 67b7afa

Browse files
committed
Tune Javadoc for RedundancyScheme
1 parent e217d9d commit 67b7afa

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

libuplink-android/src/main/java/io/storj/RedundancyScheme.java

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public RedundancyAlgorithm getAlgorithm() {
3434
}
3535

3636
/**
37-
* Returns the required number of erasure share for reconstructing the original data.
37+
* Returns the required number of erasure share to recover the original data.
3838
*
3939
* @return the required number of erasure shares
4040
*/
@@ -43,27 +43,26 @@ public short getRequiredShares() {
4343
}
4444

4545
/**
46-
* Returns the number of pieces that form the repair threshold. If the number of available
47-
* pieces on the network fall below this threshold, the repair of the data will trigger.
46+
* Returns the minimum number of safe erasure shares that can remain before a repair is
47+
* triggered.
4848
*
49-
* @return the repair threshold in number of pieces
49+
* @return the minimum number of safe erasure shares
5050
*/
51-
public short getRepairShares() {
51+
public short getRepairThreshold() {
5252
return repair;
5353
}
5454

5555
/**
56-
* Returns the number of pieces that must be uploaded to the network to consider the upload
57-
* successful.
56+
* Returns the desired total number of erasure shares for a segment.
5857
*
59-
* @return the success threshold in number of pieces
58+
* @return the desired number of erasure shares
6059
*/
6160
public short getSuccessShares() {
6261
return success;
6362
}
6463

6564
/**
66-
* Returns the total number of erasure shares generated by the erasure encoding algorithm.
65+
* Returns the total number of erasure shares generated by the erasure encoding.
6766
*
6867
* @return the total number of erasure shares
6968
*/
@@ -74,15 +73,15 @@ public short getTotalShares() {
7473
/**
7574
* Returns the size of the erasure shares.
7675
*
77-
* @return the erasure share size
76+
* @return the erasure share size in bytes
7877
*/
7978
public int getShareSize() {
8079
return shareSize;
8180
}
8281

8382
/**
84-
* Two {@link RedundancyScheme} objects are equal if their erasure encoding algorithm, required
85-
* shares, repair threshold, success threshold, total shares, and erasure share size are equal.
83+
* Two {@link RedundancyScheme} objects are equal if their erasure encoding algorithm, number of
84+
* required, repair, success, and total erasure shares, and erasure share size are all equal.
8685
*
8786
* @return <code>true</code> if this object is the same as the specified object;
8887
* <code>false</code> otherwise.
@@ -102,7 +101,7 @@ public boolean equals(Object o) {
102101

103102
/**
104103
* The hash code value of {@link RedundancyScheme} is the hash code value of its erasure
105-
* encoding algorithm, required shares, repair threshold, success threshold, total shares, and
104+
* encoding algorithm, number of required, repair, success, and total erasure shares, and
106105
* erasure share size.
107106
*
108107
* @return a hash code value for this object
@@ -169,9 +168,10 @@ public Builder setRequiredShares(short count) {
169168
}
170169

171170
/**
172-
* Determines the repair threshold in number of pieces.
171+
* Determines the minimum number of safe erasure shares that can remain before a repair is
172+
* triggered.
173173
*
174-
* @param count the number of pieces
174+
* @param count the minimum number of safe erasure shares
175175
* @return a reference to this object
176176
*/
177177
public Builder setRepairShares(short count) {
@@ -180,9 +180,9 @@ public Builder setRepairShares(short count) {
180180
}
181181

182182
/**
183-
* Determines the success threshold in number of pieces.
183+
* Determines the desired total number of erasure shares for a segment.
184184
*
185-
* @param count the number of pieces
185+
* @param count the desired total number of erasure shares
186186
* @return a reference to this object
187187
*/
188188
public Builder setSuccessShares(short count) {
@@ -191,8 +191,7 @@ public Builder setSuccessShares(short count) {
191191
}
192192

193193
/**
194-
* Determines the total number of erasure shares to generate by the erasure encoding
195-
* algorithm.
194+
* Determines the total number of erasure shares to generate by the erasure encoding.
196195
*
197196
* @param count the total number of erasure shares
198197
* @return a reference to this object

0 commit comments

Comments
 (0)