public interface ReadWriteMutex
Modifier and Type | Method and Description |
---|---|
void |
lockForReading(Runnable callable)
Lock the config for a read operation that must be read atomic.
|
<V> V |
lockForReading(Supplier<V> callable)
Lock the config for a read operation that must be read atomic.
|
void |
lockForWriting(Runnable callable)
Lock the config for a write operation that must be write atomic, and
could interfere with read operations.
|
<V> V |
lockForWriting(Supplier<V> callable)
Lock the config for a write operation that must be write atomic, and
could interfere with read operations.
|
void lockForReading(Runnable callable)
callable
- The callable operation.<V> V lockForReading(Supplier<V> callable)
V
- The read return value type.callable
- The enclosed callable to be run inside read lock.void lockForWriting(Runnable callable)
callable
- The callable operation.<V> V lockForWriting(Supplier<V> callable)
V
- The write return value type.callable
- The callable operation.Copyright © 2017. All rights reserved.