public final class PerKeyReadWriteSynchronizedExecutor<KEY_TYPE> extends Object
Calls to readExecute(...) methods:
ReadWriteLock
Calls to writeExecute(...) methods:
ReadWriteLock
On the other hand, the executor is implemented so calls from different threads, with keys that are not equals, will be executed concurrently with minimal contention between the calls. Calling threads might be suspended.
Constructor and Description |
---|
PerKeyReadWriteSynchronizedExecutor()
|
Modifier and Type | Method and Description |
---|---|
void |
readExecute(KEY_TYPE key,
Runnable task) |
<R> R |
readExecute(KEY_TYPE key,
Supplier<R> task)
|
void |
writeExecute(KEY_TYPE key,
Runnable task) |
<R> R |
writeExecute(KEY_TYPE key,
Supplier<R> task)
|
Copyright © 2016. All rights reserved.