Class Striped.CompactStriped<L>
- java.lang.Object
-
- com.google.common.util.concurrent.Striped<L>
-
- com.google.common.util.concurrent.Striped.PowerOfTwoStriped<L>
-
- com.google.common.util.concurrent.Striped.CompactStriped<L>
-
private static class Striped.CompactStriped<L> extends Striped.PowerOfTwoStriped<L>
Implementation of Striped where 2^k stripes are represented as an array of the same length, eagerly initialized.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.util.concurrent.Striped
Striped.LargeLazyStriped<L>, Striped.SmallLazyStriped<L>
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Object[]
array
Size is a power of two.-
Fields inherited from class com.google.common.util.concurrent.Striped.PowerOfTwoStriped
mask
-
-
Constructor Summary
Constructors Modifier Constructor Description private
CompactStriped(int stripes, Supplier<L> supplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description L
getAt(int index)
Returns the stripe at the specified index.int
size()
Returns the total number of stripes in this instance.-
Methods inherited from class com.google.common.util.concurrent.Striped.PowerOfTwoStriped
get, indexFor
-
Methods inherited from class com.google.common.util.concurrent.Striped
bulkGet, lazyWeakLock, lazyWeakReadWriteLock, lazyWeakSemaphore, lock, readWriteLock, semaphore
-
-