Skip to content

Commit 1586eb2

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
Release Striped.custom publicly.
Fixes #1893 (and also useful for #2514) RELNOTES=`util.concurrent`: Added `Striped.custom`. PiperOrigin-RevId: 803457130
1 parent 1176cdb commit 1586eb2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

android/guava/src/com/google/common/util/concurrent/Striped.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,9 @@ public Iterable<L> bulkGet(Iterable<? extends Object> keys) {
192192
* @param stripes the minimum number of stripes (locks) required
193193
* @param supplier a {@code Supplier<L>} object to obtain locks from
194194
* @return a new {@code Striped<L>}
195+
* @since NEXT
195196
*/
196-
static <L> Striped<L> custom(int stripes, Supplier<L> supplier) {
197+
public static <L> Striped<L> custom(int stripes, Supplier<L> supplier) {
197198
return new CompactStriped<>(stripes, supplier);
198199
}
199200

guava/src/com/google/common/util/concurrent/Striped.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,9 @@ public Iterable<L> bulkGet(Iterable<? extends Object> keys) {
192192
* @param stripes the minimum number of stripes (locks) required
193193
* @param supplier a {@code Supplier<L>} object to obtain locks from
194194
* @return a new {@code Striped<L>}
195+
* @since NEXT
195196
*/
196-
static <L> Striped<L> custom(int stripes, Supplier<L> supplier) {
197+
public static <L> Striped<L> custom(int stripes, Supplier<L> supplier) {
197198
return new CompactStriped<>(stripes, supplier);
198199
}
199200

0 commit comments

Comments
 (0)