Class Striped.PowerOfTwoStriped<L>
java.lang.Object
com.google.common.util.concurrent.Striped<L>
com.google.common.util.concurrent.Striped.PowerOfTwoStriped<L>
- Direct Known Subclasses:
Striped.CompactStriped
,Striped.LargeLazyStriped
,Striped.SmallLazyStriped
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.util.concurrent.Striped
Striped.LargeLazyStriped<L>, Striped.SmallLazyStriped<L>
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final int
Capacity (power of two) minus one, for fast mod evaluation -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.google.common.util.concurrent.Striped
bulkGet, custom, getAt, lazyWeakCustom, lazyWeakLock, lazyWeakReadWriteLock, lazyWeakSemaphore, lock, readWriteLock, semaphore, size
-
Field Details
-
mask
final int maskCapacity (power of two) minus one, for fast mod evaluation
-
-
Constructor Details
-
PowerOfTwoStriped
PowerOfTwoStriped(int stripes)
-
-
Method Details
-
indexFor
Description copied from class:Striped
Returns the index to which the given key is mapped, so that getAt(indexFor(key)) == get(key). -
get
Description copied from class:Striped
Returns the stripe that corresponds to the passed key. It is always guaranteed that ifkey1.equals(key2)
, thenget(key1) == get(key2)
.
-