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
private abstract static class Striped.PowerOfTwoStriped<L> extends Striped<L>
-
-
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 (package private) int
mask
Capacity (power of two) minus one, for fast mod evaluation
-
Constructor Summary
Constructors Constructor Description PowerOfTwoStriped(int stripes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description L
get(java.lang.Object key)
Returns the stripe that corresponds to the passed key.(package private) int
indexFor(java.lang.Object key)
Returns the index to which the given key is mapped, so that getAt(indexFor(key)) == get(key).-
Methods inherited from class com.google.common.util.concurrent.Striped
bulkGet, custom, getAt, lazyWeakLock, lazyWeakReadWriteLock, lazyWeakSemaphore, lock, readWriteLock, semaphore, size
-
-
-
-
Method Detail
-
indexFor
final int indexFor(java.lang.Object key)
Description copied from class:Striped
Returns the index to which the given key is mapped, so that getAt(indexFor(key)) == get(key).
-
-