Package | Description |
---|---|
com.google.common.util.concurrent |
Concurrency utilities.
|
Modifier and Type | Class and Description |
---|---|
private static class |
Striped.CompactStriped<L>
Implementation of Striped where 2^k stripes are represented as an array of the same length,
eagerly initialized.
|
(package private) static class |
Striped.LargeLazyStriped<L>
Implementation of Striped where up to 2^k stripes can be represented, using a ConcurrentMap
where the key domain is [0..2^k).
|
private static class |
Striped.PowerOfTwoStriped<L> |
(package private) static class |
Striped.SmallLazyStriped<L>
Implementation of Striped where up to 2^k stripes can be represented, using an
AtomicReferenceArray of size 2^k.
|
Modifier and Type | Method and Description |
---|---|
private static <L> Striped<L> |
Striped.lazy(int stripes,
Supplier<L> supplier) |
static Striped<java.util.concurrent.locks.Lock> |
Striped.lazyWeakLock(int stripes)
Creates a
Striped<Lock> with lazily initialized, weakly referenced locks. |
static Striped<java.util.concurrent.locks.ReadWriteLock> |
Striped.lazyWeakReadWriteLock(int stripes)
Creates a
Striped<ReadWriteLock> with lazily initialized, weakly referenced
read-write locks. |
static Striped<java.util.concurrent.Semaphore> |
Striped.lazyWeakSemaphore(int stripes,
int permits)
Creates a
Striped<Semaphore> with lazily initialized, weakly referenced semaphores,
with the specified number of permits. |
static Striped<java.util.concurrent.locks.Lock> |
Striped.lock(int stripes)
Creates a
Striped<Lock> with eagerly initialized, strongly referenced locks. |
static Striped<java.util.concurrent.locks.ReadWriteLock> |
Striped.readWriteLock(int stripes)
Creates a
Striped<ReadWriteLock> with eagerly initialized, strongly referenced
read-write locks. |
static Striped<java.util.concurrent.Semaphore> |
Striped.semaphore(int stripes,
int permits)
Creates a
Striped<Semaphore> with eagerly initialized, strongly referenced semaphores,
with the specified number of permits. |