public class SynchronizedObject<T>
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.locks.ReentrantReadWriteLock |
lock |
protected T |
value |
| Constructor and Description |
|---|
SynchronizedObject() |
SynchronizedObject(T value) |
| Modifier and Type | Method and Description |
|---|---|
T |
get()
This method returns stored value via read lock
|
void |
set(T value)
This method updates stored value via write lock
|
Copyright © 2019. All rights reserved.